Skip to content

Commit 2f075c1

Browse files
feat(payment): PAYPAL-5809 Updated BT SDK version
1 parent 9e782c3 commit 2f075c1

File tree

8 files changed

+303
-16
lines changed

8 files changed

+303
-16
lines changed

packages/braintree-integration/src/braintree-hosted-form/braintree-hosted-form.spec.ts

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
import {EventEmitter} from 'events';
1+
import { EventEmitter } from 'events';
22

33
import {
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

2425
import 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(),

packages/braintree-integration/src/braintree-hosted-form/braintree-hosted-form.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export default class BraintreeHostedForm {
4949
constructor(
5050
private braintreeScriptLoader: BraintreeScriptLoader,
5151
private braintreeSDKVersionManager: BraintreeSDKVersionManager,
52-
) {}
52+
) {}
5353

5454
async initialize(
5555
options: BraintreeFormOptions,

0 commit comments

Comments
 (0)