Skip to content

Commit

Permalink
✅ test: update useStore
Browse files Browse the repository at this point in the history
  • Loading branch information
arvinxx committed Aug 14, 2023
1 parent dc508f0 commit 9995505
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions __mocks__/zustand.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { act } from 'react-dom/test-utils';
import { beforeEach } from 'vitest';
import { createWithEqualityFn as actualCreate } from 'zustand/traditional';
import { createWithEqualityFn as actualCreate, useStoreWithEqualityFn } from 'zustand/traditional';

// a variable to hold reset functions for all stores declared in the app
const storeResetFns = new Set<() => void>();
Expand All @@ -26,4 +26,4 @@ export const create = (f) => (f === undefined ? createImpl : createImpl(f));

export default create;

export { useStore } from 'zustand';
export const useStore = (store, selector) => useStoreWithEqualityFn(store, selector, Object.is);

0 comments on commit 9995505

Please sign in to comment.