LibJS: Provide 'details' key in results object for duplicate test

The test-js program expects this to exist for 'result: "fail"' results
and would crash if any duplicated test(message) occurs, as we didn't
provide 'details' in that case.
This commit is contained in:
Linus Groh 2021-03-31 22:21:36 +02:00 committed by Andreas Kling
parent 316e19c3ac
commit 1ea8d73628
Notes: sideshowbarker 2024-07-18 20:55:33 +09:00

View file

@ -429,6 +429,7 @@ class ExpectationError extends Error {
if (suite[message]) {
suite[message] = {
result: "fail",
details: "Another test with the same message did already run",
};
return;
}