diff --git a/packages/babel-plugin-import-jsx-pragma/test/index.js b/packages/babel-plugin-import-jsx-pragma/test/index.js
index 13d299b4626064..4a631e241f3262 100644
--- a/packages/babel-plugin-import-jsx-pragma/test/index.js
+++ b/packages/babel-plugin-import-jsx-pragma/test/index.js
@@ -52,4 +52,15 @@ describe( 'babel-plugin-import-jsx-pragma', () => {
expect( string ).toBe( 'import { createElement } from "@wordpress/element";\nlet foo = ;' );
} );
+
+ it( 'does nothing if there scope variable already defined when using custom options', () => {
+ const original = 'const { createElement } = wp.element;\nlet foo = ;';
+ const string = getTransformedCode( original, {
+ scopeVariable: 'createElement',
+ source: '@wordpress/element',
+ isDefault: false,
+ } );
+
+ expect( string ).toBe( original );
+ } );
} );