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:
parent
8ebdf685a6
commit
461d90d042
33 changed files with 1315 additions and 1382 deletions
|
@ -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);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue