From 6a1b8135d66407cd5e6fd70ca03e88f41a6d6fae 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 e480a0d1bed050..9af040b33986f5 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 {