mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-18 00:09:44 +00:00
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: 1ea8d73628
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]) {
|
if (suite[message]) {
|
||||||
suite[message] = {
|
suite[message] = {
|
||||||
result: "fail",
|
result: "fail",
|
||||||
|
details: "Another test with the same message did already run",
|
||||||
};
|
};
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue