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 2440f81 commit a925944
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions test/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,24 @@ module.exports = function (groupBy, t) {
'thisArg and callback arguments are as expected'
);

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

s2t.deepEqual(
obj,
{
__proto__: null,
before: ['a', 'b'],
after: ['c', 'd', '💩']
},
'grouping a string works as expected'
);

s2t.end();
});

st.end();
});
};

0 comments on commit a925944

Please sign in to comment.