Permalink
Browse files

test: add regex check to test-module-loading

Also removes extraneous argument.

PR-URL: #11413
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
  • Loading branch information...
tarang9211 authored and gibfahn committed Feb 16, 2017
1 parent 88035bc commit a4c3e31ac7c1d3092c7cd7fa306ce3f3382dc5fc
Showing with 3 additions and 2 deletions.
  1. +3 −2 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'
};

0 comments on commit a4c3e31

Please sign in to comment.