Skip to content

Commit

Permalink
test: previous test changed to assert.rejects style
Browse files Browse the repository at this point in the history
  • Loading branch information
zhanzhenzhen committed Mar 28, 2018
1 parent 4b73eb6 commit 0b3bd33
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/es-module/test-esm-throw-undefined.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import common from '../common/index.js';
import assert from 'assert';

async function doTest() {
try {
await import('../fixtures/es-module-loaders/throw-undefined');
assert(false);
} catch (e) {
assert.strictEqual(e, undefined);
}
await assert.rejects(
async () => {
await import('../fixtures/es-module-loaders/throw-undefined');
},
(e) => e === undefined
);
}

doTest().then(common.mustCall());

0 comments on commit 0b3bd33

Please sign in to comment.