From 18155d4f3c9e95792d811d4e601c19503c00c3a7 Mon Sep 17 00:00:00 2001 From: Kevin Weber Date: Tue, 26 May 2020 18:31:25 -0700 Subject: [PATCH] Update test input --- .../src/__tests__/ReactFreshBabelPlugin-test.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/packages/react-refresh/src/__tests__/ReactFreshBabelPlugin-test.js b/packages/react-refresh/src/__tests__/ReactFreshBabelPlugin-test.js index cdcfe4d840730..ee2bc70f8125c 100644 --- a/packages/react-refresh/src/__tests__/ReactFreshBabelPlugin-test.js +++ b/packages/react-refresh/src/__tests__/ReactFreshBabelPlugin-test.js @@ -504,10 +504,15 @@ describe('ReactFreshBabelPlugin', () => { it("respects Babel's envName option", () => { const envName = 'random'; expect(() => - transform(`export default function BabelEnv () { return null };`, { - envName, - skipEnvCheck: false, - }), + transform( + `export default function Foo() { + return

Hi

; + }`, + { + envName, + skipEnvCheck: false, + }, + ), ).toThrowError( 'React Refresh Babel transform should only be enabled in development environment. ' + 'Instead, the environment is: "' +