tools: generate template literal for addon tests
Instead of generating string concatenation, generate a template literal. This is mostly useful as a pre-emptive measure for avoiding problems when (if?) we enable the prefer-template lint rule in the test directory. PR-URL: https://github.com/nodejs/node/pull/14094 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
This commit is contained in:
parent
0d22858d67
commit
6a1b8135d6
@ -66,7 +66,10 @@ function verifyFiles(files, blockName, onprogress, ondone) {
|
||||
if (name === 'test.js') {
|
||||
files[name] = `'use strict';
|
||||
const common = require('../../common');
|
||||
${files[name].replace('Release', "' + common.buildType + '")}
|
||||
${files[name].replace(
|
||||
"'./build/Release/addon'",
|
||||
// eslint-disable-next-line no-template-curly-in-string
|
||||
'`./build/${common.buildType}/addon`')}
|
||||
`;
|
||||
}
|
||||
return {
|
||||
|
Loading…
x
Reference in New Issue
Block a user