Skip to content

Commit

Permalink
test: add case for null
Browse files Browse the repository at this point in the history
  • Loading branch information
liuyib committed May 28, 2024
1 parent f365f5c commit aa2aebf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/hooks/src/useSelections/__tests__/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,10 @@ describe('useSelections', () => {
expect(result.current.allSelected).toBe(true);
expect(result.current.partiallySelected).toBe(false);

// Keep compatible with older versions.
act(() => {
expect(() => setSelected(undefined!)).not.toThrowError();
expect(() => setSelected(null!)).not.toThrowError();
});
};

Expand Down

0 comments on commit aa2aebf

Please sign in to comment.