Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
test: improve coverage at lib/internal/vm/module.js
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 targos committed Jun 11, 2021
1 parent 8912cab commit ec4d79e
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 ec4d79e

Please sign in to comment.