From 83b85c2a28f92f10bf9c7acd21baf284d41ab394 Mon Sep 17 00:00:00 2001 From: Josh <37798644+joshuaellis@users.noreply.github.com> Date: Mon, 18 Jan 2021 18:24:16 +0000 Subject: [PATCH] refactor: update default renderer's error message. (#547) based on the feedback from #544 --- src/__tests__/defaultRenderer.test.ts | 2 +- src/pure.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/__tests__/defaultRenderer.test.ts b/src/__tests__/defaultRenderer.test.ts index 0352813d..45d2e7ce 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 your imports to use a specific renderer.\nFor 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..2113e9ed 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 your imports to use a specific renderer.\nFor instructions see: https://react-hooks-testing-library.com/installation#being-specific` ) } }