diff --git a/src/__tests__/index.test.tsx b/src/__tests__/index.test.tsx index 3b245bf..2235014 100644 --- a/src/__tests__/index.test.tsx +++ b/src/__tests__/index.test.tsx @@ -1,6 +1,7 @@ import { NativeModules, Platform } from 'react-native'; import Chargebee, { Customer, + EntitlementsRequest, ProductIdentifiersRequest, SubscriptionsRequest, } from '../index'; @@ -155,15 +156,16 @@ describe('Chargebee React Native', () => { }); it('retrieve entitlements receipt by Subscription ID', async () => { - const subscriptionId = 'subscription-id-1'; - - await Chargebee.retrieveEntitlements(subscriptionId); + const request: EntitlementsRequest = { + subscriptionId: 'subscription-id-1', + }; + await Chargebee.retrieveEntitlements(request); expect( NativeModules.ChargebeeReactNative.retrieveEntitlements ).toBeCalledTimes(1); expect( NativeModules.ChargebeeReactNative.retrieveEntitlements - ).toHaveBeenCalledWith(subscriptionId); + ).toHaveBeenCalledWith(request); }); });