mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +00:00
LibJS: Use the native assert() implementation now avaiable in 'js -t'
Switch the LibJS test suite to use the native assert implementation surfaced inside the js repl when it's launched in test mode.
This commit is contained in:
parent
4233c8662b
commit
bc40908d32
Notes:
sideshowbarker
2024-07-19 07:54:00 +09:00
Author: https://github.com/bgianfo
Commit: bc40908d32
Pull-request: https://github.com/SerenityOS/serenity/pull/1648
60 changed files with 2 additions and 119 deletions
|
@ -1,10 +1,8 @@
|
|||
function assert(x) { if (!x) throw 1; }
|
||||
|
||||
try {
|
||||
var x = 1;
|
||||
|
||||
assert(x === 1 ? true : false);
|
||||
assert(x ? x : 0);
|
||||
assert((x ? x : 0) === x);
|
||||
assert(1 < 2 ? (true) : (false));
|
||||
|
||||
var o = {};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue