Skip to content

Commit d3740d8

Browse files
addaleaxtargos
authored andcommitted
test: improve assertions in test-cli-node-print-help
PR-URL: #22489 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Refael Ackermann <[email protected]>
1 parent 7d8ef42 commit d3740d8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/parallel/test-cli-node-print-help.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,13 @@ function validateNodePrintHelp() {
4444
function testForSubstring(options) {
4545
if (options.compileConstant) {
4646
options.flags.forEach((flag) => {
47-
assert.strictEqual(stdOut.indexOf(flag) !== -1, true);
47+
assert.strictEqual(stdOut.indexOf(flag) !== -1, true,
48+
`Missing flag ${flag} in ${stdOut}`);
4849
});
4950
} else {
5051
options.flags.forEach((flag) => {
51-
assert.strictEqual(stdOut.indexOf(flag), -1);
52+
assert.strictEqual(stdOut.indexOf(flag), -1,
53+
`Unexpected flag ${flag} in ${stdOut}`);
5254
});
5355
}
5456
}

0 commit comments

Comments
 (0)