1- import { EventEmitter } from 'events' ;
1+ import { EventEmitter } from 'events' ;
22
33import {
4+ BRAINTREE_SDK_DEFAULT_VERSION ,
45 BRAINTREE_SDK_HOSTED_FIELDS_FIX_VERSION ,
56 BraintreeFormOptions ,
67 BraintreeHostedFields ,
@@ -15,11 +16,11 @@ import {
1516 PaymentInvalidFormError ,
1617} from '@bigcommerce/checkout-sdk/payment-integration-api' ;
1718
18- import { PaymentIntegrationServiceMock } from '@bigcommerce/checkout-sdk/payment-integrations-test-utils' ;
19+ import { PaymentIntegrationServiceMock } from '@bigcommerce/checkout-sdk/payment-integrations-test-utils' ;
1920
20- import { getScriptLoader } from '@bigcommerce/script-loader' ;
21+ import { getScriptLoader } from '@bigcommerce/script-loader' ;
2122
22- import { getBillingAddress } from '../mocks/braintree.mock' ;
23+ import { getBillingAddress } from '../mocks/braintree.mock' ;
2324
2425import BraintreeHostedForm from './braintree-hosted-form' ;
2526
@@ -105,6 +106,9 @@ describe('BraintreeHostedForm', () => {
105106
106107 describe ( '#initialize' , ( ) => {
107108 it ( 'creates and configures hosted fields' , async ( ) => {
109+ jest . spyOn ( braintreeSDKVersionManager , 'getSDKVersion' ) . mockReturnValue (
110+ BRAINTREE_SDK_DEFAULT_VERSION ,
111+ ) ;
108112 const createMock = jest . fn ( ) ;
109113 const clientMock = {
110114 ...getClientMock ( ) ,
@@ -212,6 +216,9 @@ describe('BraintreeHostedForm', () => {
212216 } ) ;
213217
214218 it ( 'creates and configures hosted fields for stored card verification' , async ( ) => {
219+ jest . spyOn ( braintreeSDKVersionManager , 'getSDKVersion' ) . mockReturnValue (
220+ BRAINTREE_SDK_DEFAULT_VERSION ,
221+ ) ;
215222 const createMock = jest . fn ( ) ;
216223 const clientMock = {
217224 ...getClientMock ( ) ,
0 commit comments