Skip to content

Commit f589bb2

Browse files
juanarbolruyadorno
authored andcommitted
test: improve coverage at lib/internal/vm/module.js
PR-URL: #36898 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
1 parent 8a82415 commit f589bb2

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Diff for: test/parallel/test-vm-module-synthetic.js

+10
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,14 @@ const assert = require('assert');
6565
code: 'ERR_VM_MODULE_STATUS',
6666
});
6767
}
68+
69+
{
70+
assert.throws(() => {
71+
SyntheticModule.prototype.setExport.call({}, 'foo');
72+
}, {
73+
code: 'ERR_VM_MODULE_NOT_MODULE',
74+
message: /Provided module is not an instance of Module/
75+
});
76+
}
77+
6878
})().then(common.mustCall());

0 commit comments

Comments
 (0)