Skip to content

Commit 0bbf0de

Browse files
committed
chore(example): remove unncessary section in purchase flow
1 parent 3515ca2 commit 0bbf0de

File tree

4 files changed

+12
-365
lines changed

4 files changed

+12
-365
lines changed

example/__tests__/screens/PurchaseFlow.test.tsx

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ describe('PurchaseFlow Screen', () => {
7373
expect(getByText('Connecting to Store...')).toBeTruthy();
7474
});
7575

76-
it('fetches products and available purchases when connected', async () => {
77-
const {fetchProducts, getAvailablePurchases} = mockIapState();
76+
it('fetches products when connected', async () => {
77+
const {fetchProducts} = mockIapState();
7878

7979
render(<PurchaseFlow />);
8080

@@ -84,8 +84,6 @@ describe('PurchaseFlow Screen', () => {
8484
type: 'in-app',
8585
});
8686
});
87-
88-
expect(getAvailablePurchases).toHaveBeenCalled();
8987
});
9088

9189
it('displays fetched products', () => {
@@ -115,21 +113,6 @@ describe('PurchaseFlow Screen', () => {
115113
});
116114
});
117115

118-
it('handles refresh available purchases', async () => {
119-
const {getAvailablePurchases} = mockIapState({
120-
availablePurchases: [],
121-
});
122-
123-
const {getByText} = render(<PurchaseFlow />);
124-
125-
const refreshButton = getByText('Refresh available purchases');
126-
fireEvent.press(refreshButton!);
127-
128-
await waitFor(() => {
129-
expect(getAvailablePurchases).toHaveBeenCalledTimes(2);
130-
});
131-
});
132-
133116
it('updates state on purchase success callback', async () => {
134117
mockIapState();
135118

example/__tests__/screens/SubscriptionFlow.test.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ describe('SubscriptionFlow Screen', () => {
6969
expect(getByText('Connecting to Store...')).toBeTruthy();
7070
});
7171

72-
it('fetches subscriptions and purchases when connected', async () => {
73-
const {fetchProducts, getAvailablePurchases} = mockIapState();
72+
it('fetches subscriptions when connected', async () => {
73+
const {fetchProducts} = mockIapState();
7474

7575
render(<SubscriptionFlow />);
7676

@@ -80,8 +80,6 @@ describe('SubscriptionFlow Screen', () => {
8080
type: 'subs',
8181
});
8282
});
83-
84-
expect(getAvailablePurchases).toHaveBeenCalled();
8583
});
8684

8785
it('displays subscription information', () => {

0 commit comments

Comments
 (0)