diff --git a/src/node_types.cc b/src/node_types.cc index 4b9f86f0d54d8c..bd7ea9cf23fff7 100644 --- a/src/node_types.cc +++ b/src/node_types.cc @@ -34,6 +34,7 @@ namespace { V(SharedArrayBuffer) \ V(Proxy) \ V(WebAssemblyCompiledModule) \ + V(ModuleNamespaceObject) \ #define V(type) \ diff --git a/test/parallel/test-util-types.js b/test/parallel/test-util-types.js index aa45d1604bfe00..924869896869c0 100644 --- a/test/parallel/test-util-types.js +++ b/test/parallel/test-util-types.js @@ -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)); +})();