1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 04:38:10 +00:00
serenity/Userland/Libraries/LibTest
davidot 7cbf4b90e8 LibJS: Implement ImportCall and HostImportModuleDynamically
This allows us to load modules from scripts.
This can be dangerous as it can load arbitrary files. Because of that it
fails and throws by default. Currently, only js and JavaScriptTestRunner
enable the default hook.

This also adds tests to test-js which test module code. Because we
form a spec perspective can't "enter" a module this is the easiest way
to run tests without having to modify test-js to have special cases for
modules.
To specify modules in test-js we use the extension '.mjs' this is to
ensure the files are not executed. We do still want to lint these files
so the prettier scripts have changed to look for '.mjs' files as well.
2022-01-22 01:21:18 +00:00
..
CMakeLists.txt Meta/LibTest: Build object libraries for test main files 2021-07-29 21:46:25 +01:00
CrashTest.cpp LibTest: Add EXPECT_NO_CRASH 2021-12-19 14:22:06 -08:00
CrashTest.h LibTest: Add EXPECT_CRASH_WITH_SIGNAL 2021-12-19 14:22:06 -08:00
JavaScriptTestRunner.h LibJS: Refactor interpreter to use Script and Source Text Modules 2022-01-22 01:21:18 +00:00
JavaScriptTestRunnerMain.cpp LibJS: Implement ImportCall and HostImportModuleDynamically 2022-01-22 01:21:18 +00:00
Macros.h LibTest: Add EXPECT_NO_CRASH 2021-12-19 14:22:06 -08:00
Results.h Base+Utilities: Add run-tests program to run system tests with LibTest 2021-06-30 08:18:28 +04:30
TestCase.h LibTest: Add TEST_SETUP macro that runs before all test cases 2021-08-31 16:53:51 +02:00
TestMain.cpp AK+Userland: Move AK/TestSuite.h into LibTest and rework Tests' CMake 2021-04-25 09:36:49 +02:00
TestRunner.h LibTest: Decorate cleanup_and_exit() with [[noreturn]] 2021-09-14 21:41:51 +02:00
TestSuite.cpp LibTest: Add TEST_SETUP macro that runs before all test cases 2021-08-31 16:53:51 +02:00
TestSuite.h LibTest: Add TEST_SETUP macro that runs before all test cases 2021-08-31 16:53:51 +02:00