diff --git a/src/features/Pokedex/__test__/pokedexApi.test.ts b/src/features/Pokedex/__test__/pokedexApi.test.ts index 69da916..4e4dbd4 100644 --- a/src/features/Pokedex/__test__/pokedexApi.test.ts +++ b/src/features/Pokedex/__test__/pokedexApi.test.ts @@ -115,6 +115,7 @@ describe('pokedexApi', () => { expect(pokemonListData?.previous).toBeUndefined(); }); + // TODO: decide whether remove these test handlers, as logic of getting Pokemon List for a Region is no longer correct test('query getRegionPokemonList for johto should return correct data in list', async () => { await store.dispatch( pokedexApi.endpoints.getRegionPokemonList.initiate('johto'), diff --git a/src/features/Pokedex/pokedexApi.ts b/src/features/Pokedex/pokedexApi.ts index acd906c..8d5a752 100644 --- a/src/features/Pokedex/pokedexApi.ts +++ b/src/features/Pokedex/pokedexApi.ts @@ -66,6 +66,7 @@ export const pokedexApi = createApi({ getArea: builder.query({ query: IdOrName => ({ url: `location-area/${IdOrName}` }), }), + // TODO: decide whether remove this endpoint, as logic of getting PokemonList for a region is no longer correct getRegionPokemonList: builder.query({ async queryFn(regionIdOrName, api) { api.dispatch(setFetchingRegionPokemonList(true)); diff --git a/src/mocks/handlers.ts b/src/mocks/handlers.ts index b7ef226..173bc79 100644 --- a/src/mocks/handlers.ts +++ b/src/mocks/handlers.ts @@ -42,6 +42,7 @@ export const handlers = [ }), // getRegionPokemonList + // TODO: decide whether remove these test handlers, as logic of getting Pokemon List for a Region is no longer correct rest.get('https://pokeapi.co/api/v2/region/johto', (req, res, ctx) => { return res(ctx.json(region_johto)); }),