Browse Source

test: replace string concat in test-child-process-constructor

replace string concatenation in test/parallel/test-child-process-constructor.js
with template literals

PR-URL: https://github.com/nodejs/node/pull/14283
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
v6
mac-haojin 8 years ago
committed by James M Snell
parent
commit
b923b9dee1
  1. 14
      test/parallel/test-child-process-constructor.js

14
test/parallel/test-child-process-constructor.js

@ -19,8 +19,8 @@ function typeName(value) {
}, common.expectsError({
code: 'ERR_INVALID_ARG_TYPE',
type: TypeError,
message: 'The "options" argument must be of type object. Received type ' +
typeName(options)
message: 'The "options" argument must be of type object. ' +
`Received type ${typeName(options)}`
}));
});
}
@ -35,8 +35,8 @@ function typeName(value) {
}, common.expectsError({
code: 'ERR_INVALID_ARG_TYPE',
type: TypeError,
message: 'The "options.file" property must be of type string. Received ' +
'type ' + typeName(file)
message: 'The "options.file" property must be of type string. ' +
`Received type ${typeName(file)}`
}));
});
}
@ -52,7 +52,7 @@ function typeName(value) {
code: 'ERR_INVALID_ARG_TYPE',
type: TypeError,
message: 'The "options.envPairs" property must be of type array. ' +
'Received type ' + typeName(envPairs)
`Received type ${typeName(envPairs)}`
}));
});
}
@ -67,8 +67,8 @@ function typeName(value) {
}, common.expectsError({
code: 'ERR_INVALID_ARG_TYPE',
type: TypeError,
message: 'The "options.args" property must be of type array. Received ' +
'type ' + typeName(args)
message: 'The "options.args" property must be of type array. ' +
`Received type ${typeName(args)}`
}));
});
}

Loading…
Cancel
Save