From 2af21650d659d960863795d08ec44c092c559b7c Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Wed, 5 Jul 2017 14:43:55 -0700 Subject: [PATCH] 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: https://github.com/nodejs/node/pull/14094 Reviewed-By: Luigi Pinca Reviewed-By: Daniel Bevenius Reviewed-By: Michael Dawson --- tools/doc/addon-verify.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/doc/addon-verify.js b/tools/doc/addon-verify.js index 86a81935892745..f681b0a90eb2a6 100644 --- a/tools/doc/addon-verify.js +++ b/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 {