From 88fb450c5a00ba86d7d59aa5634485077e6cfda5 Mon Sep 17 00:00:00 2001 From: Jason Zhu Date: Wed, 12 Apr 2023 23:24:29 +1000 Subject: [PATCH] Fixed pokedexApi.test.ts --- src/features/Pokedex/__test__/pokedexApi.test.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/features/Pokedex/__test__/pokedexApi.test.ts b/src/features/Pokedex/__test__/pokedexApi.test.ts index ce5e472..1877652 100644 --- a/src/features/Pokedex/__test__/pokedexApi.test.ts +++ b/src/features/Pokedex/__test__/pokedexApi.test.ts @@ -3,8 +3,9 @@ import { pokedexSlice } from 'features/Pokedex/pokedexSlice'; import { configureStore } from '@reduxjs/toolkit'; import region1 from 'features/Pokedex/__test__/responses/region1.json'; import pokemon1 from 'features/Pokedex/__test__/responses/pokemon1.json'; -import { AppStore } from 'app/store'; import { RegionListResponseData, TypeListResponseData } from '../types/api'; +import { AppStore } from 'app/store'; +import { listenerMiddleware } from '../../../app/listenerMiddleware'; let store: AppStore; describe('pokedexApi', () => { @@ -15,7 +16,10 @@ describe('pokedexApi', () => { [pokedexApi.reducerPath]: pokedexApi.reducer, }, middleware: getDefaultMiddleware => - getDefaultMiddleware().concat(pokedexApi.middleware), + getDefaultMiddleware().concat( + pokedexApi.middleware, + listenerMiddleware.middleware, + ), }); });