From 5f231843dc958b1c401eb63beb34bab4dbea5563 Mon Sep 17 00:00:00 2001 From: Nitcelis Bravo Date: Thu, 27 Jul 2023 02:07:00 -0400 Subject: [PATCH] Remove the unnecessary await keyword --- src/tests/MissionsState.test.js | 4 ++-- src/tests/rocketsState.test.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/tests/MissionsState.test.js b/src/tests/MissionsState.test.js index 4c02e72..d1b6cfa 100644 --- a/src/tests/MissionsState.test.js +++ b/src/tests/MissionsState.test.js @@ -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(); diff --git a/src/tests/rocketsState.test.js b/src/tests/rocketsState.test.js index ecd7532..e2ffd89 100644 --- a/src/tests/rocketsState.test.js +++ b/src/tests/rocketsState.test.js @@ -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();