Skip to content

Commit

Permalink
fix: test data after type update and clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
mortennordseth committed Sep 25, 2023
1 parent 5c01fff commit c11caed
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 4 deletions.
24 changes: 23 additions & 1 deletion src/page-modules/departures/__tests__/departure.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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() {
Expand Down
4 changes: 1 addition & 3 deletions src/pages/departures.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,7 @@ function DeparturesContent({ autocompleteFeatures }: DeparturesContentProps) {
}}
>
<div>Departures container</div>
<div>
<Map initialPosition={selectedPosition} />
</div>
<Map initialPosition={selectedPosition} />
</div>
</>
);
Expand Down

0 comments on commit c11caed

Please sign in to comment.