diff --git a/modules/@shopify/checkout-sheet-kit/tests/index.test.ts b/modules/@shopify/checkout-sheet-kit/tests/index.test.ts index ef4c271..f1b8b26 100644 --- a/modules/@shopify/checkout-sheet-kit/tests/index.test.ts +++ b/modules/@shopify/checkout-sheet-kit/tests/index.test.ts @@ -48,6 +48,7 @@ jest.mock('react-native', () => { version: '0.7.0', preload: jest.fn(), present: jest.fn(), + invalidateCache: jest.fn(), getConfig: jest.fn(async () => exampleConfig), setConfig: jest.fn(), addEventListener: jest.fn(), @@ -123,6 +124,16 @@ describe('ShopifyCheckoutSheetKit', () => { }); }); + describe('invalidate', () => { + it('calls `invalidateCache`', () => { + const instance = new ShopifyCheckoutSheet(); + instance.invalidate(); + expect( + NativeModules.ShopifyCheckoutSheetKit.invalidateCache, + ).toHaveBeenCalledTimes(1); + }); + }); + describe('present', () => { it('calls `present` with a checkout URL', () => { const instance = new ShopifyCheckoutSheet();