@@ -64,13 +64,13 @@ const useTheme = (initialTheme) => {
6464}
6565
6666// useTheme.test.js
67- import { testHook , cleanup , act } from ' react-hooks-testing-library'
67+ import { renderHook , cleanup , act } from ' react-hooks-testing-library'
6868
6969describe (' custom hook tests' , () => {
7070 afterEach (cleanup)
7171
7272 test (' should use theme' , () => {
73- const { result } = testHook (() => useTheme (' light' ))
73+ const { result } = renderHook (() => useTheme (' light' ))
7474
7575 const theme = result .current
7676
@@ -79,7 +79,7 @@ describe('custom hook tests', () => {
7979 })
8080
8181 test (' should update theme' , () => {
82- const { result } = testHook (() => useTheme (' light' ))
82+ const { result } = renderHook (() => useTheme (' light' ))
8383
8484 const { toggleTheme } = result .current
8585
@@ -101,7 +101,7 @@ describe('custom hook tests', () => {
101101 < ThemesContext .Provider value= {customThemes}> {children}< / ThemesContext .Provider >
102102 )
103103
104- const { result } = testHook (() => useTheme (' light' ), { wrapper })
104+ const { result } = renderHook (() => useTheme (' light' ), { wrapper })
105105
106106 const theme = result .current
107107
0 commit comments