mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-28 04:08:08 +00:00
Switch the LibJS test suite to use the native assert implementation surfaced inside the js repl when it's launched in test mode.
16 lines
324 B
JavaScript
16 lines
324 B
JavaScript
try {
|
|
function foo() { }
|
|
assert(foo.length === 0);
|
|
assert((foo.length = 5) === 5);
|
|
assert(foo.length === 0);
|
|
|
|
function bar(a, b, c) {}
|
|
assert(bar.length === 3);
|
|
assert((bar.length = 5) === 5);
|
|
assert(bar.length === 3);
|
|
|
|
console.log("PASS");
|
|
} catch (e) {
|
|
console.log("FAIL: " + e);
|
|
}
|