Skip to content

Commit

Permalink
test: improve coverage at lib/internal/vm/module.js
Browse files Browse the repository at this point in the history
PR-URL: #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>
  • Loading branch information
juanarbol authored and aduh95 committed Jan 18, 2021
1 parent 5716130 commit 146f0fc
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/parallel/test-vm-module-synthetic.js
Expand Up @@ -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());

0 comments on commit 146f0fc

Please sign in to comment.