From b923b9dee1262363b95a6b41aaf3c6761f6f2c50 Mon Sep 17 00:00:00 2001 From: mac-haojin Date: Sun, 16 Jul 2017 15:40:17 +0800 Subject: [PATCH] test: replace string concat in test-child-process-constructor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-By: Gibson Fahnestock Reviewed-By: Colin Ihrig Reviewed-By: Timothy Gu Reviewed-By: Tobias Nießen Reviewed-By: Gireesh Punathil Reviewed-By: James M Snell --- test/parallel/test-child-process-constructor.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/test/parallel/test-child-process-constructor.js b/test/parallel/test-child-process-constructor.js index ea81f806060cb6..fe94ff066ed815 100644 --- a/test/parallel/test-child-process-constructor.js +++ b/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)}` })); }); }