diff --git a/test/sequential/test-module-loading.js b/test/sequential/test-module-loading.js index 6125eefc360f00..0331c8318e362e 100644 --- a/test/sequential/test-module-loading.js +++ b/test/sequential/test-module-loading.js @@ -97,7 +97,8 @@ console.error('test name clashes'); var 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'$/); var errorThrown = false; try { @@ -124,7 +125,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' };