Check for passed tests first in test/integration/jasmine-boot.js

This makes the order of checks consistent with the one in
`test/reporter.js` and improves safety because now any status other
than passed will be treated as a failure (also if Jasmine adds more
statuses later on).
This commit is contained in:
Tim van der Meij 2026-03-08 12:40:06 +01:00
parent 44a63549b0
commit 9c21d7016b
No known key found for this signature in database
GPG Key ID: 8C3FD2925A5F2762

View File

@ -57,11 +57,11 @@ async function runTests(results) {
return; return;
} }
++results.runs; ++results.runs;
if (result.failedExpectations.length > 0) { if (result.failedExpectations.length === 0) {
console.log(`TEST-PASSED | ${result.description}`);
} else {
++results.failures; ++results.failures;
console.log(`TEST-UNEXPECTED-FAIL | ${result.description}`); console.log(`TEST-UNEXPECTED-FAIL | ${result.description}`);
} else {
console.log(`TEST-PASSED | ${result.description}`);
} }
}, },
specStarted(result) {}, specStarted(result) {},