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
  • Loading branch information
juanarbol committed Jan 12, 2021
1 parent 1a0c5d5 commit 1a4d73b
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 1a4d73b

Please sign in to comment.