util: introduce types.isModuleNamespaceObject
PR-URL: https://github.com/nodejs/node/pull/20016 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
parent
ebe499f0c7
commit
c974f1bbe8
@ -34,6 +34,7 @@ namespace {
|
||||
V(SharedArrayBuffer) \
|
||||
V(Proxy) \
|
||||
V(WebAssemblyCompiledModule) \
|
||||
V(ModuleNamespaceObject) \
|
||||
|
||||
|
||||
#define V(type) \
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Flags: --harmony-bigint
|
||||
// Flags: --harmony-bigint --experimental-vm-modules
|
||||
/* global SharedArrayBuffer */
|
||||
'use strict';
|
||||
const common = require('../common');
|
||||
@ -126,3 +126,11 @@ for (const [ value, _method ] of [
|
||||
assert.deepStrictEqual(yup, expected[testedFunc]);
|
||||
}
|
||||
}
|
||||
|
||||
(async () => {
|
||||
const m = new vm.Module('');
|
||||
await m.link(() => 0);
|
||||
m.instantiate();
|
||||
await m.evaluate();
|
||||
assert.ok(types.isModuleNamespaceObject(m.namespace));
|
||||
})();
|
||||
|
Loading…
x
Reference in New Issue
Block a user