Skip to content

Commit 0f4e53e

Browse files
committed
update test-utils tyes
1 parent adaa0d2 commit 0f4e53e

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

redisinsight/ui/src/utils/test-utils.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ export const mockedStoreFn = () => mockStore(initialStateDefault)
171171

172172
// Set the mock store reference for the dynamic store wrapper
173173
// This ensures that store-dynamic works correctly in tests
174-
setStoreRef(mockedStore as any)
174+
setStoreRef(mockedStore)
175175

176176
// insert root state to the render Component
177177
const render = (
@@ -183,9 +183,8 @@ const render = (
183183
...renderOptions
184184
}: Options = initialStateDefault,
185185
) => {
186-
// Set the store reference for the dynamic store wrapper if a custom store is provided
187186
if (store !== mockedStore) {
188-
setStoreRef(store as any)
187+
setStoreRef(store)
189188
}
190189

191190
const Wrapper = ({ children }: { children: JSX.Element }) => (
@@ -208,9 +207,8 @@ const renderHook = (
208207
...renderOptions
209208
}: Options = initialStateDefault,
210209
) => {
211-
// Set the store reference for the dynamic store wrapper if a custom store is provided
212210
if (store !== mockedStore) {
213-
setStoreRef(store as any)
211+
setStoreRef(store)
214212
}
215213

216214
const Wrapper = ({ children }: { children: JSX.Element }) => (

0 commit comments

Comments
 (0)