Skip to content

Commit 83b85c2

Browse files
authored
refactor: update default renderer's error message. (#547)
based on the feedback from #544
1 parent d980fc0 commit 83b85c2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Diff for: src/__tests__/defaultRenderer.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ describe('default renderer', () => {
3434
})
3535

3636
const expectedMessage =
37-
"Could not auto-detect a React renderer. Are you sure you've installed one of the following\n - react-dom\n - react-test-renderer"
37+
"Could not auto-detect a React renderer. Are you sure you've installed one of the following\n - react-dom\n - react-test-renderer\nIf you are using a bundler, please update your imports to use a specific renderer.\nFor instructions see: https://react-hooks-testing-library.com/installation#being-specific"
3838

3939
expect(() => require('..')).toThrowError(new Error(expectedMessage))
4040
})

Diff for: src/pure.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function getRenderer() {
2727
.join('\n')
2828

2929
throw new Error(
30-
`Could not auto-detect a React renderer. Are you sure you've installed one of the following\n${options}`
30+
`Could not auto-detect a React renderer. Are you sure you've installed one of the following\n${options}\nIf you are using a bundler, please update your imports to use a specific renderer.\nFor instructions see: https://react-hooks-testing-library.com/installation#being-specific`
3131
)
3232
}
3333
}

0 commit comments

Comments
 (0)