Skip to content

Commit

Permalink
module: add missing space in error message
Browse files Browse the repository at this point in the history
PR-URL: #27627
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Yongsheng Zhang <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
  • Loading branch information
cjihrig authored and targos committed May 14, 2019
1 parent 169ddc5 commit 8a96182
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/internal/modules/cjs/loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -853,7 +853,7 @@ function createRequireFromPath(filename) {

Module.createRequireFromPath = createRequireFromPath;

const createRequireError = 'must be a file URL object, file URL string, or' +
const createRequireError = 'must be a file URL object, file URL string, or ' +
'absolute path string';

function createRequire(filename) {
Expand Down
4 changes: 3 additions & 1 deletion test/parallel/test-module-create-require.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,7 @@ assert.throws(() => {
assert.throws(() => {
createRequire({});
}, {
code: 'ERR_INVALID_ARG_VALUE'
code: 'ERR_INVALID_ARG_VALUE',
message: 'The argument \'filename\' must be a file URL object, file URL ' +
'string, or absolute path string. Received {}'
});

0 comments on commit 8a96182

Please sign in to comment.