From 990709787c81dda29a6475ffd2108424453d6f78 Mon Sep 17 00:00:00 2001
From: Marcello Lamonaca <marcello.lamonaca@gmail.com>
Date: Wed, 24 Mar 2021 17:21:04 +0100
Subject: [PATCH] Improve variable names

---
 JavaScript/React/Redux Tests.md | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/JavaScript/React/Redux Tests.md b/JavaScript/React/Redux Tests.md
index b14cad2..3fbcbeb 100644
--- a/JavaScript/React/Redux Tests.md	
+++ b/JavaScript/React/Redux Tests.md	
@@ -70,14 +70,14 @@ import reducer from "path/to/reducer";
 import * as actions from "path/to/actionCreators";
 
 it("test description", () => {
-    const initialState = /* satte before the action */;
-    const stateUpdate = /* modified state */;
-
-    const action = actions.actionCreator(stateUpdate);
+    const initialState = /* state before the action */;
+    const finalState = /* expected state after the action */
+    const data = /* data passed to the action creator */;
 
+    const action = actions.actionCreator(data);
     const newState = reducer(initialState, action);
 
-    expect(newState.property).toEqual(actual);
+    expect(newState).toEqual(finalState);
 });
 ```
 
@@ -93,12 +93,14 @@ import * as actions from "path/to/actionCreators";
 it("test description", () => {
     const store = createStore(toorReducer, initialState);
 
-    const stateUpdate = /* modified state */;
-    const action = actions.actionCreator(stateUpdate);
+    const expectedState = /* state after the update */
+
+    const data = /* action creator input */;
+    const action = actions.actionCreator(data);
     store.dispatch(action);
 
     const state = store.getState();
-    expect(state).toEqual(stateUpdate);
+    expect(state).toEqual(expectedState);
 });
 ```