Skip to content

Commit 7c89fc6

Browse files
daledupreezwjrosa
authored andcommitted
Fix AmazonPaySettingsSection tests
1 parent 624cd67 commit 7c89fc6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

client/entrypoints/amazon-pay-settings/__tests__/amazon-pay-settings.test.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ describe( 'AmazonPaySettingsSection', () => {
6060
expect( screen.getByLabelText( 'Default (48 px)' ) ).toBeChecked();
6161
} );
6262

63-
it( 'triggers the hooks when the settings are being interacted with', () => {
63+
it( 'triggers the hooks when the settings are being interacted with', async () => {
6464
const setButtonSizeMock = jest.fn();
6565

6666
useAmazonPayButtonSize.mockReturnValue( [
@@ -73,7 +73,8 @@ describe( 'AmazonPaySettingsSection', () => {
7373

7474
expect( setButtonSizeMock ).not.toHaveBeenCalled();
7575

76-
userEvent.click( screen.getByLabelText( 'Large (56 px)' ) );
76+
await userEvent.click( screen.getByLabelText( 'Large (56 px)' ) );
77+
7778
expect( setButtonSizeMock ).toHaveBeenCalledWith( 'large' );
7879
} );
7980
} );

0 commit comments

Comments
 (0)