Skip to content

Commit

Permalink
[Tests] increase coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Apr 1, 2024
1 parent 5c6e1ef commit 039c0b1
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions test/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,23 @@ module.exports = function (groupBy, t) {
'thisArg and callback arguments are as expected'
);

st.test('strings', function (s2t) {
var map = groupBy('abcd💩', function (char) {
return char < 'c' ? 'before' : 'after';
});

s2t.deepEqual(
map,
new $Map([
['before', ['a', 'b']],
['after', ['c', 'd', '💩']]
]),
'grouping a string works as expected'
);

s2t.end();
});

st.end();
});
};

0 comments on commit 039c0b1

Please sign in to comment.