Skip to content

Commit 843285d

Browse files
committed
Updated README to renderHook terminology
1 parent 98a9491 commit 843285d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -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

6969
describe('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

Comments
 (0)