10000 add simple test to reproduce groupBy regression · immutable-js/immutable-js@02880de · GitHub
[go: up one dir, main page]

Skip to content

Commit 02880de

Browse files
committed
add simple test to reproduce groupBy regression
1 parent 8561fcb commit 02880de

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

__tests__/regression.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { describe, expect, it } from '@jest/globals';
2+
import { List } from 'immutable';
3+
4+
describe('undefined groupBy', () => {
5+
it('should not throw an error when groupBy is called with undefined', () => {
6+
const list = List([1, 2, 3]);
7+
expect(() => list.groupBy(() => undefined)).not.toThrow();
8+
});
9+
});

0 commit comments

Comments
 (0)
0