From d227bf89e5837cca450c33acdfa4dde8b727b2d8 Mon Sep 17 00:00:00 2001 From: Tarang Hirani Date: Thu, 16 Feb 2017 12:44:13 +0530 Subject: [PATCH 1/2] test: removed extra arg from test-module-loading --- test/sequential/test-module-loading.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/sequential/test-module-loading.js b/test/sequential/test-module-loading.js index dd4e7ba76b611f..8ce44da152e118 100644 --- a/test/sequential/test-module-loading.js +++ b/test/sequential/test-module-loading.js @@ -126,7 +126,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' }; From 7ae40b590ad7c47b931f46243501ceb30cff4f71 Mon Sep 17 00:00:00 2001 From: Tarang Hirani Date: Sun, 19 Feb 2017 00:26:26 +0530 Subject: [PATCH 2/2] test: added regex parameter for test-module-loading --- test/sequential/test-module-loading.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/sequential/test-module-loading.js b/test/sequential/test-module-loading.js index 8ce44da152e118..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 {