addMessage
should return an object with keys type
and message
.");'
- text: ''
testString: 'assert(typeof mapDispatchToProps === "function", "mapDispatchToProps
should be a function.");'
- text: يجب أن ترجع mapDispatchToProps
كائن.
testString: 'assert(typeof mapDispatchToProps() === "object", "mapDispatchToProps
should return an object.");'
- text: ''
testString: 'assert((function() { let testAction; const dispatch = (fn) => { testAction = fn; }; let dispatchFn = mapDispatchToProps(dispatch); dispatchFn.submitNewMessage("__TEST__MESSAGE__"); return (testAction.type === "ADD" && testAction.message === "__TEST__MESSAGE__"); })(), "Dispatching addMessage
with submitNewMessage
from mapDispatchToProps
should return a message to the dispatch function.");'
```