Skip to content

Commit

Permalink
tools: generate template literal for addon tests
Browse files Browse the repository at this point in the history
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 7, 2017
1 parent 0d22858 commit 6a1b813
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tools/doc/addon-verify.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 6a1b813

Please sign in to comment.