mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
test: improve assertion error message in test-debug-usage
PR-URL: https://github.com/nodejs/node/pull/30913 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
committed by
Anna Henningsen
parent
917d896d6a
commit
31b8f4476f
@@ -24,5 +24,8 @@ child.on('exit', common.mustCall(function(code) {
|
||||
const outputLines = actualUsageMessage.split('\n');
|
||||
assert.strictEqual(code, 1);
|
||||
for (let i = 0; i < expectedLines.length; i++)
|
||||
assert(expectedLines[i].test(outputLines[i]));
|
||||
assert.ok(
|
||||
expectedLines[i].test(outputLines[i]),
|
||||
`${outputLines[i]} did not match ${expectedLines[i]}`
|
||||
);
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user