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 9995505 commit 60fc29a
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, useStoreWithEqualityFn } from 'zustand/traditional';
import { createWithEqualityFn as actualCreate } 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 const useStore = (store, selector) => useStoreWithEqualityFn(store, selector, Object.is);
export { useStoreWithEqualityFn as useStore } from 'zustand/traditional';

0 comments on commit 60fc29a

Please sign in to comment.