Skip to content

Commit 34220b7

Browse files
tarang9211addaleax
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 c5ff76d commit 34220b7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/sequential/test-module-loading.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,8 @@ console.error('test name clashes');
9999
const my_path = require('../fixtures/path');
100100
assert.ok(my_path.path_func instanceof Function);
101101
// this one does not exist and should throw
102-
assert.throws(function() { require('./utils'); });
102+
assert.throws(function() { require('./utils'); },
103+
/^Error: Cannot find module '.\/utils'$/);
103104

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

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

0 commit comments

Comments
 (0)