1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-29 07:05:06 +00:00

LibJS: Convert Array tests to new testing framework

This commit is contained in:
Linus Groh 2020-07-04 18:56:48 +01:00 committed by Andreas Kling
parent 8ebdf685a6
commit 461d90d042
33 changed files with 1315 additions and 1382 deletions

View file

@ -1,6 +1,4 @@
load("test-common.js");
try {
test("Issue #1992, shrinking array during find() iteration", () => {
var a, callbackCalled;
callbackCalled = 0;
@ -9,7 +7,7 @@ try {
callbackCalled++;
a.pop();
});
assert(callbackCalled === 5);
expect(callbackCalled).toBe(5);
callbackCalled = 0;
a = [1, 2, 3, 4, 5];
@ -17,9 +15,5 @@ try {
callbackCalled++;
a.pop();
});
assert(callbackCalled === 5);
console.log("PASS");
} catch (e) {
console.log("FAIL: " + e);
}
expect(callbackCalled).toBe(5);
});