Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@paypal/checkout-components

Package Overview
Dependencies
Maintainers
23
Versions
507
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@paypal/checkout-components - npm Package Compare versions

Comparing version 5.0.299 to 5.0.300

src/ui/buttons/buttons.test.jsx

4

package.json
{
"name": "@paypal/checkout-components",
"version": "5.0.299",
"version": "5.0.300",
"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/connect-loader-component";
import { loadAxo } from "@paypal/accelerated-checkout-loader/dist/loader.esm";
import { stringifyError } from "@krakenjs/belter/src";

@@ -4,0 +4,0 @@ import {

/* @flow */
import { getUserIDToken, getSDKToken } from "@paypal/sdk-client/src";
import { loadAxo } from "@paypal/connect-loader-component";
// eslint-disable-next-line import/no-namespace
import * as axo from "@paypal/accelerated-checkout-loader/dist/loader.esm";
import { describe, expect, test, vi } from "vitest";

@@ -33,8 +34,2 @@

vi.mock("@paypal/connect-loader-component", () => {
return {
loadAxo: vi.fn(),
};
});
describe("getConnectComponent: returns ConnectComponent", () => {

@@ -52,3 +47,3 @@ const mockAxoMetadata = { someData: "data" };

loadAxo.mockResolvedValue({ metadata: mockAxoMetadata });
vi.spyOn(axo, "loadAxo").mockResolvedValue({ metadata: mockAxoMetadata });
});

@@ -102,3 +97,3 @@

const errorMessage = "Something went wrong";
loadAxo.mockRejectedValue(errorMessage);
axo.loadAxo.mockRejectedValue(errorMessage);

@@ -121,3 +116,3 @@ await expect(() => getConnectComponent(mockProps)).rejects.toThrow(

await getConnectComponent(mockProps);
expect(loadAxo).toHaveBeenCalledWith({
expect(axo.loadAxo).toHaveBeenCalledWith({
minified: true,

@@ -124,0 +119,0 @@ btSdkVersion: "3.97.3-connect-alpha.6.1",

@@ -126,3 +126,3 @@ /* @flow */

layouts: [BUTTON_LAYOUT.VERTICAL],
layouts: [BUTTON_LAYOUT.HORIZONTAL, BUTTON_LAYOUT.VERTICAL],

@@ -129,0 +129,0 @@ maxCards: maxCardForCountry,

@@ -291,3 +291,6 @@ /* @flow */

{tagline && layout === BUTTON_LAYOUT.HORIZONTAL && !fundingSource ? (
{tagline &&
layout === BUTTON_LAYOUT.HORIZONTAL &&
!fundingSource &&
!fundingSources.includes(FUNDING.CARD) ? (
<TagLine

@@ -314,4 +317,3 @@ fundingSource={fundingSources[0]}

{layout === BUTTON_LAYOUT.VERTICAL &&
fundingSources.indexOf(FUNDING.CARD) !== -1 ? (
{fundingSources.includes(FUNDING.CARD) ? (
<PoweredByPayPal locale={locale} nonce={nonce} />

@@ -318,0 +320,0 @@ ) : null}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc