1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 18:18:12 +00:00

LibJS: Add test-common.js tests, remove unused matchers

Now that test-common.js is quite a bit more complicated, we need tests
for test-common to make sure all of the matchers behave correctly
This commit is contained in:
Matthew Olsson 2020-07-03 18:09:35 -07:00 committed by Andreas Kling
parent eea6041302
commit b86faeaeef
3 changed files with 261 additions and 76 deletions

View file

@ -58,6 +58,7 @@ Vector<String> tests_to_run = {
"object-method-shorthand.js",
"object-spread.js",
"tagged-template-literals.js",
"test-common-tests.js",
"switch-basic.js",
"update-expression-on-member-expression.js",
};
@ -131,7 +132,7 @@ FileResults run_test(const String& path, const String& test_root)
// FIXME: Should be printed to stdout in a nice format
auto& arr = interpreter->get_variable("__UserOutput__", interpreter->global_object()).as_array();
for (auto& entry : arr.indexed_properties()) {
dbg() << "OUTPUT: " << entry.value_and_attributes(&interpreter->global_object()).value.to_string(*interpreter);
dbg() << "OUTPUT: " << entry.value_and_attributes(&interpreter->global_object()).value.to_string_without_side_effects();
}
// FIXME: This is _so_ scuffed