GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — commitwork/codegraph/test/v8-surface-units.test.mjs at main · Portll/commitwork Expand file tree/ Copy pathv8-surface-units.test.mjsMore file actions 37 lines (30 loc) · 1.29 KB / Copy pathv8-surface-units.test.mjsFile metadata and controls37 lines (30 loc) · 1.29 KB 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. |