Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
util: introduce types.isModuleNamespaceObject
  • Loading branch information
devsnek committed Apr 15, 2018
commit 8daa1c90ff7e5cc25b8a90a83cda43f8f56bb68f
1 change: 1 addition & 0 deletions src/node_types.cc
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ namespace {
V(SharedArrayBuffer) \
V(Proxy) \
V(WebAssemblyCompiledModule) \
V(ModuleNamespaceObject) \


#define V(type) \
Expand Down
10 changes: 9 additions & 1 deletion test/parallel/test-util-types.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Flags: --harmony-bigint
// Flags: --harmony-bigint --experimental-vm-modules
/* global SharedArrayBuffer */
'use strict';
const common = require('../common');
Expand Down Expand Up @@ -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));
})();