mirror of
https://github.com/nodejs/node.git
synced 2026-10-28 18:25:13 +08:00
test: improve coverage at lib/internal/vm/module.js
PR-URL: https://github.com/nodejs/node/pull/36898 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com>
This commit is contained in:
1 parent
5716130d1e
commit
146f0fc495
1 file changed
+10
@@ -65,4 +65,14 @@ const assert = require('assert');
|
||||
code: 'ERR_VM_MODULE_STATUS',
|
||||
});
|
||||
}
|
||||
|
||||
{
|
||||
assert.throws(() => {
|
||||
SyntheticModule.prototype.setExport.call({}, 'foo');
|
||||
}, {
|
||||
code: 'ERR_VM_MODULE_NOT_MODULE',
|
||||
message: /Provided module is not an instance of Module/
|
||||
});
|
||||
}
|
||||
|
||||
})().then(common.mustCall());
|
||||
Reference in new issue
Block a user