diff --git a/docs/installation.md b/docs/installation.md index 33f17f25..942178cd 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -57,8 +57,8 @@ The standard import looks like: import { renderHook } from '@testing-library/react-hooks' ``` -> Note: The auto detection function may not work if tests are bundles before execution (e.g. to be -> run in a browser) +> Note: The auto detection function may not work if tests are being bundled (e.g. to be run in a +> browser) ### Act diff --git a/src/__tests__/defaultRenderer.test.ts b/src/__tests__/defaultRenderer.test.ts index 0352813d..5c633a5e 100644 --- a/src/__tests__/defaultRenderer.test.ts +++ b/src/__tests__/defaultRenderer.test.ts @@ -34,7 +34,7 @@ describe('default renderer', () => { }) const expectedMessage = - "Could not auto-detect a React renderer. Are you sure you've installed one of the following\n - react-dom\n - react-test-renderer" + "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 you imports to use a specific renderer. For instructions see: https://react-hooks-testing-library.com/installation#being-specific" expect(() => require('..')).toThrowError(new Error(expectedMessage)) }) diff --git a/src/pure.ts b/src/pure.ts index 699c7c10..8146b1b6 100644 --- a/src/pure.ts +++ b/src/pure.ts @@ -27,7 +27,7 @@ function getRenderer() { .join('\n') throw new Error( - `Could not auto-detect a React renderer. Are you sure you've installed one of the following\n${options}` + `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 you imports to use a specific renderer. For instructions see: https://react-hooks-testing-library.com/installation#being-specific` ) } }