Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 83b85c2

Browse files
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

‎src/__tests__/defaultRenderer.test.ts

Lines changed: 1 addition & 1 deletion
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
})

‎src/pure.ts

Lines changed: 1 addition & 1 deletion
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)

AltStyle によって変換されたページ (->オリジナル) /