From 205f297d0749bc9a53b6988d4e7edeb4f25bf820 Mon Sep 17 00:00:00 2001 From: Satyajit Sahoo Date: Mon, 22 Feb 2021 00:15:54 +0100 Subject: [PATCH] chore: fix warnings in tests --- .../BaseNavigationContainer.test.tsx | 40 +++++++++---------- .../src/__tests__/useDescriptors.test.tsx | 6 +-- .../core/src/__tests__/useNavigation.test.tsx | 2 +- 3 files changed, 24 insertions(+), 24 deletions(-) diff --git a/packages/core/src/__tests__/BaseNavigationContainer.test.tsx b/packages/core/src/__tests__/BaseNavigationContainer.test.tsx index 15757cf6..4d42a5be 100644 --- a/packages/core/src/__tests__/BaseNavigationContainer.test.tsx +++ b/packages/core/src/__tests__/BaseNavigationContainer.test.tsx @@ -141,10 +141,10 @@ it('handle dispatching with ref', () => { state: { index: 0, key: '4', - routeNames: ['qux', 'lex'], + routeNames: ['qux2', 'lex2'], routes: [ - { key: 'qux', name: 'qux' }, - { key: 'lex', name: 'lex' }, + { key: 'qux2', name: 'qux2' }, + { key: 'lex2', name: 'lex2' }, ], }, }, @@ -163,8 +163,8 @@ it('handle dispatching with ref', () => { {() => ( - {() => null} - {() => null} + {() => null} + {() => null} )} @@ -172,8 +172,8 @@ it('handle dispatching with ref', () => { {() => ( - {() => null} - {() => null} + {() => null} + {() => null} )} @@ -203,10 +203,10 @@ it('handle dispatching with ref', () => { type: 'test', index: 0, key: '1', - routeNames: ['qux', 'lex'], + routeNames: ['qux2', 'lex2'], routes: [ - { key: 'lex', name: 'lex' }, - { key: 'qux', name: 'qux' }, + { key: 'lex2', name: 'lex2' }, + { key: 'qux2', name: 'qux2' }, ], }, }, @@ -237,8 +237,8 @@ it('handle resetting state with ref', () => { {() => ( - {() => null} - {() => null} + {() => null} + {() => null} )} @@ -246,8 +246,8 @@ it('handle resetting state with ref', () => { {() => ( - {() => null} - {() => null} + {() => null} + {() => null} )} @@ -266,10 +266,10 @@ it('handle resetting state with ref', () => { state: { index: 0, key: '4', - routeNames: ['qux', 'lex'], + routeNames: ['qux2', 'lex2'], routes: [ - { key: 'qux', name: 'qux' }, - { key: 'lex', name: 'lex' }, + { key: 'qux2', name: 'qux2' }, + { key: 'lex2', name: 'lex2' }, ], }, }, @@ -293,10 +293,10 @@ it('handle resetting state with ref', () => { state: { index: 0, key: '6', - routeNames: ['qux', 'lex'], + routeNames: ['qux2', 'lex2'], routes: [ - { key: 'qux', name: 'qux' }, - { key: 'lex', name: 'lex' }, + { key: 'qux2', name: 'qux2' }, + { key: 'lex2', name: 'lex2' }, ], stale: false, type: 'test', diff --git a/packages/core/src/__tests__/useDescriptors.test.tsx b/packages/core/src/__tests__/useDescriptors.test.tsx index 91d2e56a..113aa2d0 100644 --- a/packages/core/src/__tests__/useDescriptors.test.tsx +++ b/packages/core/src/__tests__/useDescriptors.test.tsx @@ -600,14 +600,14 @@ it('returns true for canGoBack when parent router handles GO_BACK', () => { const root = ( - + {() => ( - + )} - + {() => ( {() => null} diff --git a/packages/core/src/__tests__/useNavigation.test.tsx b/packages/core/src/__tests__/useNavigation.test.tsx index 12296c1c..9639e884 100644 --- a/packages/core/src/__tests__/useNavigation.test.tsx +++ b/packages/core/src/__tests__/useNavigation.test.tsx @@ -91,7 +91,7 @@ it("gets navigation's parent's parent from context", () => { {() => ( - + {() => (