woocommerce-paypal-payments/modules/ppcp-blocks/resources/js/test/checkout-handler.test.js
2024-06-22 15:53:46 +02:00

15 lines
459 B
JavaScript

import {render, screen} from '@testing-library/react';
import '@testing-library/jest-dom';
import {CheckoutHandler} from "../Components/checkout-handler";
test('checkout handler label display given text', async () => {
render(
<CheckoutHandler
getCardFieldsForm={() => {}}
saveCardText="Foo"
is_vaulting_enabled={true}
/>
);
await expect(screen.getByLabelText('Foo')).toBeInTheDocument();
});