From 208022cb313209000ca490628fc3f03e392671aa 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 PR-URL: https://github.com/nodejs/node/pull/22489 Reviewed-By: Richard Lau Reviewed-By: Luigi Pinca Reviewed-By: Refael Ackermann --- 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 e715fdbcb8f..3f9354b89cd 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}`); }); } }