summaryrefslogtreecommitdiff
path: root/Userland/Libraries
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2021-03-31 22:21:36 +0200
committerAndreas Kling <kling@serenityos.org>2021-03-31 23:59:21 +0200
commit1ea8d73628e64b49326247ed049a7607facc195f (patch)
treeb6e49fd1d11b7a13cd996b10b8dfab0e084d9afb /Userland/Libraries
parent316e19c3ac152ef2c6e944a43a3be336edb4d568 (diff)
downloadserenity-1ea8d73628e64b49326247ed049a7607facc195f.zip
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.
Diffstat (limited to 'Userland/Libraries')
-rw-r--r--Userland/Libraries/LibJS/Tests/test-common.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/Userland/Libraries/LibJS/Tests/test-common.js b/Userland/Libraries/LibJS/Tests/test-common.js
index 4e6d0e62e0..eaf107d0ed 100644
--- a/Userland/Libraries/LibJS/Tests/test-common.js
+++ b/Userland/Libraries/LibJS/Tests/test-common.js
@@ -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;
}