Skip to content

Commit

Permalink
LibJS: Provide 'details' key in results object for duplicate test
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
linusg authored and awesomekling committed Mar 31, 2021
1 parent 316e19c commit 1ea8d73
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Userland/Libraries/LibJS/Tests/test-common.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 1ea8d73

Please sign in to comment.