Skip to content

Commit

Permalink
Remove the unnecessary await keyword
Browse files Browse the repository at this point in the history
  • Loading branch information
NitBravoA92 committed Jul 27, 2023
1 parent 8501094 commit 5f23184
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/tests/MissionsState.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ import { getAllMissions } from '../redux/missions/missionsSlice';

describe('The Missions state', () => {
test('must be an object with an empty array initially', async () => {
const initState = await store.getState().missions;
const initState = store.getState().missions;

expect(initState).toEqual({ missions: [], isLoading: false, error: null });
});

test("should be updated with the Missions data when the 'getAllMissions' action is dispatched", async () => {
const updateMissionsState = await store.dispatch(getAllMissions());
const newState = await store.getState().missions;
const newState = store.getState().missions;

expect(updateMissionsState.type).toEqual('missions/getAllMissions/fulfilled');
expect(newState.missions).toBeTruthy();
Expand Down
4 changes: 2 additions & 2 deletions src/tests/rocketsState.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ import { getAllRockets } from '../redux/rockets/rocketsSlice';

describe('The Rockets state', () => {
test('must be an object with an empty array initially', async () => {
const initState = await store.getState().rockets;
const initState = store.getState().rockets;

expect(initState).toEqual({ rockets: [], isLoading: false, error: null });
});

test("should be updated with the Rockets data when the 'getAllRockets' action is dispatched", async () => {
const updateRocketsState = await store.dispatch(getAllRockets());
const newState = await store.getState().rockets;
const newState = store.getState().rockets;

expect(updateRocketsState.type).toEqual('rockets/getAllRockets/fulfilled');
expect(newState.rockets).toBeTruthy();
Expand Down

0 comments on commit 5f23184

Please sign in to comment.