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 targos committed May 25, 2021
1 parent baa2d1a commit 0d7882b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/parallel/test-vm-module-synthetic.js
Original file line number Diff line number Diff line change
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 0d7882b

Please sign in to comment.