From cc2ad6d3cf3e02be26a06296185f79586d726510 Mon Sep 17 00:00:00 2001 From: Noah Allen Date: Thu, 6 Jul 2023 16:41:25 -0700 Subject: [PATCH] Fix another unit test --- packages/babel-plugin-import-jsx-pragma/test/index.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/babel-plugin-import-jsx-pragma/test/index.js b/packages/babel-plugin-import-jsx-pragma/test/index.js index bcd915f1b5dad1..7125aa3995538f 100644 --- a/packages/babel-plugin-import-jsx-pragma/test/index.js +++ b/packages/babel-plugin-import-jsx-pragma/test/index.js @@ -24,8 +24,7 @@ describe( 'babel-plugin-import-jsx-pragma', () => { } ); it( 'does nothing if the scope variable is already defined', () => { - const original = - 'const React = require("react");\n\nlet foo = ;'; + const original = 'const React = require("react");\nlet foo = ;'; const string = getTransformedCode( original ); expect( string ).toBe( original ); @@ -60,7 +59,7 @@ describe( 'babel-plugin-import-jsx-pragma', () => { it( 'adds import for scope variable even when defined inside the local scope', () => { const original = - 'let foo = ;\n\nfunction local() {\n const createElement = wp.element.createElement;\n}'; + 'let foo = ;\nfunction local() {\n const createElement = wp.element.createElement;\n}'; const string = getTransformedCode( original, { scopeVariable: 'createElement', source: '@wordpress/element',