From d7814b19daeed05a0c8b91352adac2d7f8970001 Mon Sep 17 00:00:00 2001 From: Benjamin Elo Date: Thu, 5 Sep 2019 03:22:08 -0700 Subject: [PATCH] Migrate navigation tests Summary: Migrated all the tests. I've put these in a single diff as there were only a couple of lines that had to be changed in each file. Reviewed By: danielbuechele Differential Revision: D17181587 fbshipit-source-id: cdcc20d71a47e786db4cefbebe9ea686d5e235e5 --- ...Search.node.js => testAutoCompleteSearch.node.tsx} | 11 ++++------- .../__tests__/{testURI.node.js => testURI.node.tsx} | 2 +- 2 files changed, 5 insertions(+), 8 deletions(-) rename src/plugins/navigation/__tests__/{testAutoCompleteSearch.node.js => testAutoCompleteSearch.node.tsx} (92%) rename src/plugins/navigation/__tests__/{testURI.node.js => testURI.node.tsx} (98%) diff --git a/src/plugins/navigation/__tests__/testAutoCompleteSearch.node.js b/src/plugins/navigation/__tests__/testAutoCompleteSearch.node.tsx similarity index 92% rename from src/plugins/navigation/__tests__/testAutoCompleteSearch.node.js rename to src/plugins/navigation/__tests__/testAutoCompleteSearch.node.tsx index 1e1367729..13d9db624 100644 --- a/src/plugins/navigation/__tests__/testAutoCompleteSearch.node.js +++ b/src/plugins/navigation/__tests__/testAutoCompleteSearch.node.tsx @@ -6,17 +6,14 @@ * @flow strict-local */ -import {filterMatchPatterns} from '../util/autoCompleteProvider.tsx'; +import {filterMatchPatterns} from '../util/autoCompleteProvider'; -import type {URI} from '../flow-types'; +import {URI} from '../types'; // choose all k length combinations from array -const stringCombination: (Array, number) => Array = ( - patterns, - k, -) => { +const stringCombination = (patterns: Array, k: number) => { const n = patterns.length; - const returnArr = new Array(0); + const returnArr: Array = new Array(0); const args = new Array(k).fill(0).map((_, idx) => idx); (function build(args) { const pattern = args.map(i => patterns[i]).join(''); diff --git a/src/plugins/navigation/__tests__/testURI.node.js b/src/plugins/navigation/__tests__/testURI.node.tsx similarity index 98% rename from src/plugins/navigation/__tests__/testURI.node.js rename to src/plugins/navigation/__tests__/testURI.node.tsx index 311252d25..498e969f1 100644 --- a/src/plugins/navigation/__tests__/testURI.node.js +++ b/src/plugins/navigation/__tests__/testURI.node.tsx @@ -11,7 +11,7 @@ import { parameterIsNumberType, replaceRequiredParametersWithValues, filterOptionalParameters, -} from '../util/uri.tsx'; +} from '../util/uri'; test('parse required parameters from uri', () => { const testURI =