loginAction
should return an object with type property set to the string LOGIN
.");'
- text: ''
testString: 'assert(store.getState().login === false, "The store should be initialized with an object with property login
set to false
.");'
- text: ''
testString: 'assert((function() { const initialState = store.getState(); store.dispatch(loginAction()); const afterState = store.getState(); return initialState.login === false && afterState.login === true })(), "Dispatching loginAction
should update the login
property in the store state to true
.");'
- text: ''
testString: 'assert((function() { store.dispatch({type: "__TEST__ACTION__"}); let afterTest = store.getState(); return typeof afterTest === "object" && afterTest.hasOwnProperty("login") })(), "If the action is not of type LOGIN
, the store should return the current state.");'
```