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 <[email protected]>
Reviewed-By: Daniel Bevenius <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
  • Loading branch information
Trott authored and addaleax committed Jul 18, 2017
1 parent a0866b6 commit b97e140
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 b97e140

Please sign in to comment.