diff options
author | Linus Groh <mail@linusgroh.de> | 2021-03-31 22:21:36 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-03-31 23:59:21 +0200 |
commit | 1ea8d73628e64b49326247ed049a7607facc195f (patch) | |
tree | b6e49fd1d11b7a13cd996b10b8dfab0e084d9afb /Userland/Libraries/LibJS/Tests | |
parent | 316e19c3ac152ef2c6e944a43a3be336edb4d568 (diff) | |
download | serenity-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/LibJS/Tests')
-rw-r--r-- | Userland/Libraries/LibJS/Tests/test-common.js | 1 |
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; } |