Skip to content

Commit

Permalink
Fix another unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
noahtallen committed Jul 6, 2023
1 parent c54baa7 commit cc2ad6d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/babel-plugin-import-jsx-pragma/test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = <bar />;';
const original = 'const React = require("react");\nlet foo = <bar />;';
const string = getTransformedCode( original );

expect( string ).toBe( original );
Expand Down Expand Up @@ -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 = <bar />;\n\nfunction local() {\n const createElement = wp.element.createElement;\n}';
'let foo = <bar />;\nfunction local() {\n const createElement = wp.element.createElement;\n}';
const string = getTransformedCode( original, {
scopeVariable: 'createElement',
source: '@wordpress/element',
Expand Down

0 comments on commit cc2ad6d

Please sign in to comment.