summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibJS')
-rw-r--r--Userland/Libraries/LibJS/Tests/builtins/Map/Map.prototype.keys.js13
1 files changed, 3 insertions, 10 deletions
diff --git a/Userland/Libraries/LibJS/Tests/builtins/Map/Map.prototype.keys.js b/Userland/Libraries/LibJS/Tests/builtins/Map/Map.prototype.keys.js
index 2734be1308..bf69fce257 100644
--- a/Userland/Libraries/LibJS/Tests/builtins/Map/Map.prototype.keys.js
+++ b/Userland/Libraries/LibJS/Tests/builtins/Map/Map.prototype.keys.js
@@ -10,16 +10,9 @@ test("basic functionality", () => {
];
const a = new Map(original);
const it = a.keys();
- // FIXME: This test should be rewritten once we have proper iteration order
- const first = it.next();
- expect(first.done).toBeFalse();
- expect(a.has(first.value)).toBeTrue();
- const second = it.next();
- expect(second.done).toBeFalse();
- expect(a.has(second.value)).toBeTrue();
- const third = it.next();
- expect(third.done).toBeFalse();
- expect(a.has(third.value)).toBeTrue();
+ expect(it.next()).toEqual({ value: "a", done: false });
+ expect(it.next()).toEqual({ value: "b", done: false });
+ expect(it.next()).toEqual({ value: "c", done: false });
expect(it.next()).toEqual({ value: undefined, done: true });
expect(it.next()).toEqual({ value: undefined, done: true });
expect(it.next()).toEqual({ value: undefined, done: true });