Skip to content

Commit

Permalink
test(test): fix testing
Browse files Browse the repository at this point in the history
  • Loading branch information
unadlib committed Nov 17, 2024
1 parent 3d432ae commit 007e9ad
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions test/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4094,11 +4094,10 @@ describe('set - new API', () => {
const difference = Set.prototype.difference;
// @ts-ignore
delete Set.prototype.difference;
const odds = new Set([1, 3, 5, 7, 9]);
const squares = new Set([1, 4, 9]);
const state = create(odds, (draft) => {
const odds = new Set([{a: 1}]);
const state = create({ odds }, (draft) => {
// @ts-ignore
expect(() => draft.difference(squares)).toThrow();
draft.odds.values().next().value.a = 2;
});
// @ts-ignore
Set.prototype.difference = difference;
Expand Down

0 comments on commit 007e9ad

Please sign in to comment.