Skip to content

Commit

Permalink
test data: Well-type navStateWithNarrow; make more representative.
Browse files Browse the repository at this point in the history
The added fields were gleaned from a real-life example observed with
`redux-logger`.

[cherry-picked from zulip#4171]
  • Loading branch information
chrisbobbe committed Jul 10, 2020
1 parent c6d4067 commit 14593fb
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/utils/testHelpers.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
/* @flow strict-local */
import type { Narrow } from '../types';
import type { NavigationState } from '../reduxTypes';

export const navStateWithNarrow = (narrow: Narrow): {| nav: mixed |} => ({
export const navStateWithNarrow = (narrow: Narrow): {| nav: NavigationState |} => ({
nav: {
index: 0,
key: 'StackRouterRoot',
index: 1,
isTransitioning: false,
routes: [
{
key: 'id-1592948746166-1',
params: {},
routeName: 'main',
},
{
key: 'id-1592948746166-2',
routeName: 'chat',
params: {
narrow,
Expand Down

0 comments on commit 14593fb

Please sign in to comment.