Remove unncessary beforeAfter in jest, store was re-created for every test
parent
4db65c6375
commit
6aa1baa5fd
|
@ -18,10 +18,6 @@ describe('pokedexApi', () => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
afterEach(() => {
|
|
||||||
store.dispatch(pokedexApi.util.resetApiState());
|
|
||||||
});
|
|
||||||
|
|
||||||
describe('JEST test against real API', () => {
|
describe('JEST test against real API', () => {
|
||||||
test('visit https://pokeapi.co/api/v2/region/1 should return correct data', async () => {
|
test('visit https://pokeapi.co/api/v2/region/1 should return correct data', async () => {
|
||||||
await store.dispatch(pokedexApi.endpoints.getRegion.initiate(1));
|
await store.dispatch(pokedexApi.endpoints.getRegion.initiate(1));
|
||||||
|
|
Loading…
Reference in New Issue