Skip to content

Commit 090dbd7

Browse files
committed
Ensure stable comparison
1 parent e4fb711 commit 090dbd7

File tree

1 file changed

+6
-0
lines changed
  • lib/node_modules/@stdlib/utils/bifurcate-in/test

1 file changed

+6
-0
lines changed

lib/node_modules/@stdlib/utils/bifurcate-in/test/test.js

+6
Original file line numberDiff line numberDiff line change
@@ -607,6 +607,12 @@ tape( 'the function invokes the predicate function with both the object value an
607607
];
608608
out = bifurcateIn( obj, predicate );
609609

610+
// To ensure stable comparison due to iteration order instability, we only want to test that the sets are the same, not the order...
611+
out[ 0 ].sort();
612+
out[ 1 ].sort();
613+
expected[ 0 ].sort();
614+
expected[ 1 ].sort();
615+
610616
t.deepEqual( out, expected, 'returns expected groups' );
611617
t.end();
612618
});

0 commit comments

Comments
 (0)