File tree Expand file tree Collapse file tree 1 file changed +1
-17
lines changed
Expand file tree Collapse file tree 1 file changed +1
-17
lines changed Original file line number Diff line number Diff line change @@ -31,23 +31,7 @@ const fixtures = require('../common/fixtures');
3131
3232 register('data:text/javascript,' + encodeURIComponent(code));
3333
34- try {
35- await import('file:///test-null-source.js');
36- console.log('ERROR: Should have thrown');
37- process.exit(1);
38- } catch (err) {
39- // Should throw ERR_INVALID_RETURN_PROPERTY_VALUE, not ERR_INTERNAL_ASSERTION
40- if (err.code === 'ERR_INTERNAL_ASSERTION') {
41- console.log('FAIL: Got ERR_INTERNAL_ASSERTION');
42- process.exit(1);
43- }
44- if (err.code === 'ERR_INVALID_RETURN_PROPERTY_VALUE') {
45- console.log('PASS: Got expected error');
46- process.exit(0);
47- }
48- console.log('ERROR: Got unexpected error:', err.code);
49- process.exit(1);
50- }
34+ await assert.rejects(import('file:///test-null-source.js'), { code: 'ERR_INVALID_RETURN_PROPERTY_VALUE' });
5135 ` ,
5236 ] ,
5337 { encoding : 'utf8' }
You can’t perform that action at this time.
0 commit comments