summaryrefslogtreecommitdiff
path: root/Libraries/LibJS/Tests/loops/do-while-basic.js
diff options
context:
space:
mode:
Diffstat (limited to 'Libraries/LibJS/Tests/loops/do-while-basic.js')
-rw-r--r--Libraries/LibJS/Tests/loops/do-while-basic.js20
1 files changed, 8 insertions, 12 deletions
diff --git a/Libraries/LibJS/Tests/loops/do-while-basic.js b/Libraries/LibJS/Tests/loops/do-while-basic.js
index b701cceb9a..943490996b 100644
--- a/Libraries/LibJS/Tests/loops/do-while-basic.js
+++ b/Libraries/LibJS/Tests/loops/do-while-basic.js
@@ -1,18 +1,14 @@
-load("test-common.js");
-
-try {
- var number = 0;
+test("basic functionality", () => {
+ let number = 0;
do {
number++;
} while (number < 9);
- assert(number === 9);
+ expect(number).toBe(9);
+});
- number = 0;
+test("no braces", () => {
+ let number = 0;
do number++;
while (number < 3);
- assert(number === 3);
-
- console.log("PASS");
-} catch (e) {
- console.log("FAIL: " + e);
-}
+ expect(number).toBe(3);
+});