23 lines
838 B
TypeScript
23 lines
838 B
TypeScript
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
/**
|
|
* Catalogue section 3 — `flash-delivery/index.tsx` redirect (APP-11).
|
|
*
|
|
* The index route only renders `<Redirect href="...(products)" />`; the expo-router
|
|
* mock records that as a `router.replace`.
|
|
*/
|
|
import * as React from 'react'
|
|
import { render } from '@testing-library/react-native'
|
|
|
|
import FlashDeliveryIndex from '@/app/(drawer)/(tabs)/flash-delivery/index'
|
|
import { resetAllMocks } from '../helpers/reset'
|
|
import { router } from '../mocks/expo-router-mock'
|
|
|
|
describe('Flash delivery index (APP)', () => {
|
|
beforeEach(() => resetAllMocks())
|
|
|
|
it('APP-11: the flash delivery index redirects to the (products) route', () => {
|
|
render(<FlashDeliveryIndex />)
|
|
|
|
expect(router.replace).toHaveBeenCalledWith('/(drawer)/(tabs)/flash-delivery/(products)')
|
|
})
|
|
})
|