Skip to content

Commit 4f6bb39

Browse files
rtioclaude
andcommitted
test: add missing enabled_methods fallback tests for Google Pay and Amazon Pay
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 0e136e9 commit 4f6bb39

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

client/express-checkout/blocks/__tests__/index.test.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,22 @@ describe( 'Express checkout blocks registration', () => {
168168
expect( result ).toBe( false );
169169
expect( checkPaymentMethodIsAvailable ).not.toHaveBeenCalled();
170170
} );
171+
172+
it( 'should return false for Google Pay (defaults to empty array)', () => {
173+
const result = expressCheckoutElementGooglePay(
174+
mockApi
175+
).canMakePayment( { cart: mockCart } );
176+
expect( result ).toBe( false );
177+
expect( checkPaymentMethodIsAvailable ).not.toHaveBeenCalled();
178+
} );
179+
180+
it( 'should return false for Amazon Pay (defaults to empty array)', () => {
181+
const result = expressCheckoutElementAmazonPay(
182+
mockApi
183+
).canMakePayment( { cart: mockCart } );
184+
expect( result ).toBe( false );
185+
expect( checkPaymentMethodIsAvailable ).not.toHaveBeenCalled();
186+
} );
171187
} );
172188
} );
173189
} );

0 commit comments

Comments
 (0)