1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-10 04:07:35 +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:
Brian Gianforcaro 2020-04-05 05:52:09 -07:00 committed by Andreas Kling
parent 4233c8662b
commit bc40908d32
60 changed files with 2 additions and 119 deletions

View file

@ -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 = {};