GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — commitwork/codegraph/test/v8-surface-units.test.mjs at main · Portll/commitwork

Expand file tree

/

v8-surface-units.test.mjs

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
37 lines (30 loc) · 1.29 KB
/

v8-surface-units.test.mjs

Copy path

File metadata and controls

37 lines (30 loc) · 1.29 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// codegraph/test/v8-surface-units.test.mjs — case tests for vmModulesAvailable.
import test from 'node:test';
import assert from 'node:assert/strict';
import { vmModulesAvailable } from '../v8-surface.mjs';
test('returns true when vm.SourceTextModule is a function', () => {
const fakeVm = { SourceTextModule: function SourceTextModule() {} };
assert.equal(vmModulesAvailable(fakeVm), true);
});
test('returns false when vm.SourceTextModule is not a function', () => {
const fakeVm = { SourceTextModule: 'not-a-function' };
assert.equal(vmModulesAvailable(fakeVm), false);
});
test('returns false when vm.SourceTextModule is undefined', () => {
const fakeVm = { SourceTextModule: undefined };
assert.equal(vmModulesAvailable(fakeVm), false);
});
test('returns false when vm is null', () => {
assert.equal(vmModulesAvailable(null), false);
});
test('returns false when vm is undefined', () => {
assert.equal(vmModulesAvailable(undefined), false);
});
test('returns false when vm is a plain object without SourceTextModule', () => {
const fakeVm = { otherProp: 42 };
assert.equal(vmModulesAvailable(fakeVm), false);
});
test('returns true when SourceTextModule is an arrow function', () => {
const fakeVm = { SourceTextModule: () => {} };
assert.equal(vmModulesAvailable(fakeVm), true);
});
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.