Add code tag to test in extract-state-logic-to-redux (#36553)

This commit is contained in:
SomeDer
2019-08-12 09:50:13 +01:00
committed by Oliver Eyton-Williams
parent 7bb6aa7605
commit 4ff5e6eff6

View File

@ -24,7 +24,7 @@ Then create a reducer called <code>messageReducer()</code> that handles the stat
tests:
- text: The const <code>ADD</code> should exist and hold a value equal to the string <code>ADD</code>
testString: assert(ADD === 'ADD');
- text: The action creator <code>addMessage</code> should return an object with <code>type</code> equal to <code>ADD</code> and message equal to the message that is passed in.
- text: The action creator <code>addMessage</code> should return an object with <code>type</code> equal to <code>ADD</code> and <code>message</code> equal to the message that is passed in.
testString: assert((function() { const addAction = addMessage('__TEST__MESSAGE__'); return addAction.type === ADD && addAction.message === '__TEST__MESSAGE__'; })());
- text: <code>messageReducer</code> should be a function.
testString: assert(typeof messageReducer === 'function');