diff --git a/test/sequential/test-module-loading.js b/test/sequential/test-module-loading.js index dd4e7ba76b611f..3355930df60c6d 100644 --- a/test/sequential/test-module-loading.js +++ b/test/sequential/test-module-loading.js @@ -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 { @@ -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' };