summaryrefslogtreecommitdiff
path: root/Tests/LibJS
AgeCommit message (Collapse)Author
2021-10-03LibJS: Add a specific test for invalid unicode characters in the lexerdavidot
Also fixes that it tried to make substrings past the end of the source if we overran the source length.
2021-09-30LibJS + test-js: Get results from the global object directlydavidot
This is as the spec would require you to do it and necessary for changes to come in the following commits.
2021-09-14LibJS+LibTest: Use JS::Script and JS::SourceTextModule in test-jsAndreas Kling
Instead of creating a Parser and Lexer manually in test-js, we now use either JS::Script::parse() or JS::SourceTextModule::parse() to load tests.
2021-09-12LibJS: Use ErrorType::NotAnObjectOfType instead of NotATimothy Flynn
2021-09-08test-js: Add a mark_as_garbage method to force GC to collect that objectdavidot
This should fix the flaky tests of test-js. It also fixes the tests when running with the -g flag since the values will not be garbage collected too soon.
2021-08-15LibJS: Add a mode to parse JS as a moduledavidot
In a module strict mode should be enabled at the start of parsing and we allow import and export statements.
2021-06-30Userland+Tests: Split out generic test runner from JS TestRunnerAndrew Kaster
Split out the functionality to gather multiple tests from the filesystem and run them in turn into Test::TestRunner, and leave the JavaScript specific test harness logic in Test::JS::TestRunner and friends.
2021-06-17Everywhere: Add component declarationsGunnar Beutner
This adds component declarations so that users can select to not build certain parts of the OS.
2021-06-12LibJS: Add all of the WeakMap.prototype methods (delete, get, has, set)Idan Horowitz
2021-06-09LibJS: Notify WeakSets when heap cells are sweepedIdan Horowitz
This is an implementation of the following optional optimization: https://tc39.es/ecma262/#sec-weakref-execution
2021-05-30LibTest+test-js: Add back the lost test262 parser test optionAli Mohammad Pur
Fixes #7566.
2021-05-18LibJS+LibTest: Move out the test-js test runner into LibTestAli Mohammad Pur
2021-05-14Tests: Don't use TestRunners after their scope ends in test-jsAndrew Kaster
The TestRunner objects at the end of test-js are destroyed after the if/else that chooses whether to run the 262 parser tests or the standard tests. Accessing TestRunner::the() after the lifetime of the TestRunners ends is UB, so return the Test::Counts from run() instead. Also, fix the destructor of TestRunner to set s_the to nullptr so that if anyone tries this type of shenanigains again, they'll get a crash :^).
2021-05-12LibCore+Everywhere: Move OpenMode out of IODeviceAli Mohammad Pur
...and make it an enum class so people don't omit "OpenMode".
2021-05-09Tests: Fix install of test-js and test-webBrian Gianforcaro
When these were moved, there was a copy paste bug in the install directives of both of these binaries.
2021-05-08Tests: Move Userland/Utilities/test-js to Tests/LibJSBrian Gianforcaro