Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions test/parallel/test-require-exceptions.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
'use strict';
var common = require('../common');
var assert = require('assert');
const common = require('../common');
const assert = require('assert');

// A module with an error in it should throw
assert.throws(function() {
require(common.fixturesDir + '/throws_error');
});
}, /^Error: blah$/);

// Requiring the same module again should throw as well
assert.throws(function() {
require(common.fixturesDir + '/throws_error');
});
}, /^Error: blah$/);

// Requiring a module that does not exist should throw an
// error with its `code` set to MODULE_NOT_FOUND
Expand Down