Skip to content

Commit b2f7e7a

Browse files
tarang9211MylesBorins
authored andcommitted
test: add regex check to test-module-loading
Also removes extraneous argument. PR-URL: #11413 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Yuta Hiroto <[email protected]>
1 parent eca1e80 commit b2f7e7a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/sequential/test-module-loading.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,8 @@ console.error('test name clashes');
9797
var my_path = require('../fixtures/path');
9898
assert.ok(my_path.path_func instanceof Function);
9999
// this one does not exist and should throw
100-
assert.throws(function() { require('./utils'); });
100+
assert.throws(function() { require('./utils'); },
101+
/^Error: Cannot find module '.\/utils'$/);
101102

102103
var errorThrown = false;
103104
try {
@@ -124,7 +125,7 @@ assert.strictEqual(require('../fixtures/registerExt.hello.world').test,
124125
'passed');
125126

126127
console.error('load custom file types that return non-strings');
127-
require.extensions['.test'] = function(module, filename) {
128+
require.extensions['.test'] = function(module) {
128129
module.exports = {
129130
custom: 'passed'
130131
};

0 commit comments

Comments
 (0)