incAction منشئ الإجراء بإرجاع كائن تصرف type يساوي قيمة INCREMENT
testString: 'assert(incAction().type ===INCREMENT, "The action creator incAction should return an action object with type equal to the value of INCREMENT");'
- text: ''
testString: 'assert(decAction().type === DECREMENT, "The action creator decAction should return an action object with type equal to the value of DECREMENT");'
- text: ''
testString: 'assert(store.getState() === 0, "The Redux store should initialize with a state of 0.");'
- text: ''
testString: 'assert((function() { const initialState = store.getState(); store.dispatch(incAction()); const incState = store.getState(); return initialState + 1 === incState })(), "Dispatching incAction on the Redux store should increment the state by 1.");'
- text: ''
testString: 'assert((function() { const initialState = store.getState(); store.dispatch(decAction()); const decState = store.getState(); return initialState - 1 === decState })(), "Dispatching decAction on the Redux store should decrement the state by 1.");'
- text: ''
testString: 'assert(typeof counterReducer === "function", "counterReducer should be a function");'
```