Permalink
Browse files

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 <luigipinca@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
  • Loading branch information...
Trott committed Jul 5, 2017
1 parent 0d22858 commit 6a1b8135d66407cd5e6fd70ca03e88f41a6d6fae
Showing with 4 additions and 1 deletion.
  1. +4 −1 tools/doc/addon-verify.js
@@ -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 {

0 comments on commit 6a1b813

Please sign in to comment.