State logic-ஐ test செய்வது உங்கள் state transitions மற்றும் updates சரியானவை என்ற நம்பிக்கையை உருவாக்குகிறது. உத்தி logic எப்படி கட்டமைக்கப்பட்டுள்ளது என்பதைப் பொறுத்தது — pure functions (reducers) test செய்வது எளிது, எனவே நன்கு கட்டமைக்கப்பட்ட state நன்கு testable state-ஆகவும் இருக்கிறது.
Pure reducers-ஐ நேரடியாக test செய்யுங்கள் (எளிதான, உயர்-மதிப்பு வழக்கு)
(, {
(, {
initial = [];
next = (initial, { : , : { : , : } });
(next).([{ : , : }]);
(initial).([]);
});
});
