Skip to content

Commit 2af2165

Browse files
TrottMylesBorins
authored andcommitted
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: #14094 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Daniel Bevenius <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
1 parent 325813e commit 2af2165

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tools/doc/addon-verify.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,10 @@ function verifyFiles(files, blockName, onprogress, ondone) {
6666
if (name === 'test.js') {
6767
files[name] = `'use strict';
6868
const common = require('../../common');
69-
${files[name].replace('Release', "' + common.buildType + '")}
69+
${files[name].replace(
70+
"'./build/Release/addon'",
71+
// eslint-disable-next-line no-template-curly-in-string
72+
'`./build/${common.buildType}/addon`')}
7073
`;
7174
}
7275
return {

0 commit comments

Comments
 (0)