From 603bb0281d1115ef362284a210542ccb0eb64b7f Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Thu, 23 Aug 2018 22:40:01 +0200 Subject: [PATCH] test: improve assertions in test-cli-node-print-help --- test/parallel/test-cli-node-print-help.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-cli-node-print-help.js b/test/parallel/test-cli-node-print-help.js index ad6da699e41c61..ca880969166f62 100644 --- a/test/parallel/test-cli-node-print-help.js +++ b/test/parallel/test-cli-node-print-help.js @@ -44,11 +44,13 @@ function validateNodePrintHelp() { function testForSubstring(options) { if (options.compileConstant) { options.flags.forEach((flag) => { - assert.strictEqual(stdOut.indexOf(flag) !== -1, true); + assert.strictEqual(stdOut.indexOf(flag) !== -1, true, + `Missing flag ${flag} in ${stdOut}`); }); } else { options.flags.forEach((flag) => { - assert.strictEqual(stdOut.indexOf(flag), -1); + assert.strictEqual(stdOut.indexOf(flag), -1, + `Unexpected flag ${flag} in ${stdOut}`); }); } }