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:
parent
316e19c3ac
commit
1ea8d73628
Notes:
sideshowbarker
2024-07-18 20:55:33 +09:00
Author: https://github.com/linusg Commit: https://github.com/SerenityOS/serenity/commit/1ea8d73628e Pull-request: https://github.com/SerenityOS/serenity/pull/6045
1 changed files with 1 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue