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 <ruben@bridgewater.de>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
  • 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.