mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 23:25:20 +00:00
Everywhere: Hoist the Libraries folder to the top-level
This commit is contained in:
committed by
Andreas Kling
parent
950e819ee7
commit
93712b24bf
24
Libraries/LibJS/Tests/loops/do-while-basic.js
Normal file
24
Libraries/LibJS/Tests/loops/do-while-basic.js
Normal file
@@ -0,0 +1,24 @@
|
||||
test("basic functionality", () => {
|
||||
let number = 0;
|
||||
do {
|
||||
number++;
|
||||
} while (number < 9);
|
||||
expect(number).toBe(9);
|
||||
});
|
||||
|
||||
test("no braces", () => {
|
||||
let number = 0;
|
||||
do number++;
|
||||
while (number < 3);
|
||||
expect(number).toBe(3);
|
||||
});
|
||||
|
||||
test("exception in test expression", () => {
|
||||
expect(() => {
|
||||
do {} while (foo);
|
||||
}).toThrow(ReferenceError);
|
||||
});
|
||||
|
||||
test("automatic semicolon insertion", () => {
|
||||
expect("do {} while (false) foo").toEval();
|
||||
});
|
||||
Reference in New Issue
Block a user