Skip to content

Commit

Permalink
fix naming for the test and update changeset
Browse files Browse the repository at this point in the history
  • Loading branch information
Hai-Yen Nguyen committed Jan 22, 2025
1 parent 25fa9d1 commit 35591cd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/modern-drinks-think.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@paypal/paypal-js": minor
---

Adding test for card-fields.test.ts
8 changes: 4 additions & 4 deletions packages/paypal-js/types/tests/card-fields.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { test, vi, describe, expect } from "vitest";

import { PayPalCardFieldsComponentOptions } from "../components/card-fields";

describe("testing", () => {
describe.only("testing createOrder and createVaultToken types", () => {
test("only creatOrder", () => {
const createOrderCallback: PayPalCardFieldsComponentOptions = {
createOrder: vi.fn(),
Expand All @@ -24,8 +24,8 @@ describe("testing", () => {
expect(createVaultSetupTokenCallback.createOrder).toBeUndefined();
});

test.skip("Can't have both", () => {
// @ts-expect-error : should throw error if both createOrder and createVaultSetuptoken called
test.skip("Can't have both createOrdre and createVaultSetupToken", () => {
// @ts-expect-error : should throw error if both createOrder and createVaultSetupToken called
const callback: PayPalCardFieldsComponentOptions = {
createOrder: vi.fn(),
createVaultSetupToken: vi.fn(),
Expand All @@ -36,7 +36,7 @@ describe("testing", () => {
expect(callback).toThrowError();
});

test.skip("Can't have both", () => {
test.skip("Can't implement neither", () => {
// @ts-expect-error: should throw error if neither createOrder or createVaultSetuptoken called
const callback: PayPalCardFieldsComponentOptions = {
onApprove: vi.fn(),
Expand Down

0 comments on commit 35591cd

Please sign in to comment.