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
5 changes: 3 additions & 2 deletions test/sequential/test-module-loading.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@ console.error('test name clashes');
const my_path = require('../fixtures/path');
assert.ok(my_path.path_func instanceof Function);
// this one does not exist and should throw
assert.throws(function() { require('./utils'); });
assert.throws(function() { require('./utils'); },
/^Error: Cannot find module '.\/utils'$/);

let errorThrown = false;
try {
Expand All @@ -126,7 +127,7 @@ assert.strictEqual(require('../fixtures/registerExt.hello.world').test,
'passed');

console.error('load custom file types that return non-strings');
require.extensions['.test'] = function(module, filename) {
require.extensions['.test'] = function(module) {
module.exports = {
custom: 'passed'
};
Expand Down