From 0c43c587cc145aef601063b6d368f0004b02e4ca Mon Sep 17 00:00:00 2001 From: Shu-yu Guo Date: Thu, 11 Apr 2024 14:57:05 -0700 Subject: [PATCH] Fix groupBy string test keys to be insertion order --- test/built-ins/Map/groupBy/string.js | 2 +- test/built-ins/Object/groupBy/string.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/built-ins/Map/groupBy/string.js b/test/built-ins/Map/groupBy/string.js index 5c5e8378c0..960c7c3493 100644 --- a/test/built-ins/Map/groupBy/string.js +++ b/test/built-ins/Map/groupBy/string.js @@ -17,6 +17,6 @@ const map = Map.groupBy(string, function (char) { return char < '🙏' ? 'before' : 'after'; }); -assert.compareArray(Array.from(map.keys()), ['before', 'after']); +assert.compareArray(Array.from(map.keys()), ['after', 'before']); assert.compareArray(map.get('before'), ['💩', '😈']); assert.compareArray(map.get('after'), ['🥰', '🙏']); diff --git a/test/built-ins/Object/groupBy/string.js b/test/built-ins/Object/groupBy/string.js index cec1547175..3d4713a280 100644 --- a/test/built-ins/Object/groupBy/string.js +++ b/test/built-ins/Object/groupBy/string.js @@ -17,6 +17,6 @@ const obj = Object.groupBy(string, function (char) { return char < '🙏' ? 'before' : 'after'; }); -assert.compareArray(Object.keys(obj), ['before', 'after']); +assert.compareArray(Object.keys(obj), ['after', 'before']); assert.compareArray(obj.before, ['💩', '😈']); assert.compareArray(obj.after, ['🥰', '🙏']);