From c11caed48604f7418362e209b9e6ec273368bcc4 Mon Sep 17 00:00:00 2001 From: mortennordseth Date: Mon, 25 Sep 2023 10:30:46 +0200 Subject: [PATCH] fix: test data after type update and clean up --- .../departures/__tests__/departure.test.tsx | 24 ++++++++++++++++++- src/pages/departures.tsx | 4 +--- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/src/page-modules/departures/__tests__/departure.test.tsx b/src/page-modules/departures/__tests__/departure.test.tsx index 349d912c3..e3df7ac97 100644 --- a/src/page-modules/departures/__tests__/departure.test.tsx +++ b/src/page-modules/departures/__tests__/departure.test.tsx @@ -19,9 +19,21 @@ describe('departure page', function () { autocompleteFeatures: [ { name: 'Result 1', + category: [], + layer: '', + locality: '', + geometry: { + coordinates: [62.47, 6.14], + }, }, { name: 'Result 2', + category: [], + layer: '', + locality: '', + geometry: { + coordinates: [62.47, 6.14], + }, }, ], headersAcceptLanguage: 'en', @@ -36,7 +48,17 @@ describe('departure page', function () { }); it('Should return props from getServerSideProps', async () => { - const expectedResult = [{ name: 'Test' }]; + const expectedResult = [ + { + name: 'Test', + category: [], + layer: '', + locality: '', + geometry: { + coordinates: [62.47, 6.14], + }, + }, + ]; const client: HttpClient<'entur', AutocompleteApi> = { async autocomplete() { diff --git a/src/pages/departures.tsx b/src/pages/departures.tsx index 8a9f4c5ce..feb39742d 100644 --- a/src/pages/departures.tsx +++ b/src/pages/departures.tsx @@ -60,9 +60,7 @@ function DeparturesContent({ autocompleteFeatures }: DeparturesContentProps) { }} >
Departures container
-
- -
+ );