@paypal/checkout-components
Advanced tools
Comparing version 5.0.300 to 5.0.301
{ | ||
"name": "@paypal/checkout-components", | ||
"version": "5.0.300", | ||
"version": "5.0.301", | ||
"description": "PayPal Checkout components, for integrating checkout products.", | ||
@@ -113,4 +113,4 @@ "main": "index.js", | ||
"@krakenjs/zoid": "^10.3.1", | ||
"@paypal/accelerated-checkout-loader": "^1.0.0", | ||
"@paypal/common-components": "^1.0.35", | ||
"@paypal/connect-loader-component": "1.1.1", | ||
"@paypal/funding-components": "^1.0.31", | ||
@@ -117,0 +117,0 @@ "@paypal/sdk-client": "^4.0.181", |
/* @flow */ | ||
import { loadAxo } from "@paypal/accelerated-checkout-loader/dist/loader.esm"; | ||
import { loadAxo } from "@paypal/connect-loader-component"; | ||
import { stringifyError } from "@krakenjs/belter/src"; | ||
@@ -4,0 +4,0 @@ import { |
/* @flow */ | ||
import { getUserIDToken, getSDKToken } from "@paypal/sdk-client/src"; | ||
// eslint-disable-next-line import/no-namespace | ||
import * as axo from "@paypal/accelerated-checkout-loader/dist/loader.esm"; | ||
import { loadAxo } from "@paypal/connect-loader-component"; | ||
import { describe, expect, test, vi } from "vitest"; | ||
@@ -34,2 +33,8 @@ | ||
vi.mock("@paypal/connect-loader-component", () => { | ||
return { | ||
loadAxo: vi.fn(), | ||
}; | ||
}); | ||
describe("getConnectComponent: returns ConnectComponent", () => { | ||
@@ -47,3 +52,3 @@ const mockAxoMetadata = { someData: "data" }; | ||
vi.spyOn(axo, "loadAxo").mockResolvedValue({ metadata: mockAxoMetadata }); | ||
loadAxo.mockResolvedValue({ metadata: mockAxoMetadata }); | ||
}); | ||
@@ -97,3 +102,3 @@ | ||
const errorMessage = "Something went wrong"; | ||
axo.loadAxo.mockRejectedValue(errorMessage); | ||
loadAxo.mockRejectedValue(errorMessage); | ||
@@ -116,3 +121,3 @@ await expect(() => getConnectComponent(mockProps)).rejects.toThrow( | ||
await getConnectComponent(mockProps); | ||
expect(axo.loadAxo).toHaveBeenCalledWith({ | ||
expect(loadAxo).toHaveBeenCalledWith({ | ||
minified: true, | ||
@@ -119,0 +124,0 @@ btSdkVersion: "3.97.3-connect-alpha.6.1", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
14809
1159570
19
144
+ Added@paypal/connect-loader-component@1.1.1(transitive)
- Removed@paypal/accelerated-checkout-loader@1.1.0(transitive)