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.
  • Loading branch information
Trott committed Jul 6, 2017
1 parent 6809429 commit aa5bb43
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 aa5bb43

Please sign in to comment.