UNPKG
react-vaccine
Version:
latest (0.0.3)
0.0.3
0.0.2
0.0.1
Config-free React and Redux testkit
github.com/robtaussig/react-vaccine
robtaussig/react-vaccine
react-vaccine
/
lib
/
mock-state.js
18 lines
(14 loc)
•
278 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
export
default
class
MockState
{
deepClone
(
state
) {
return
Object
.
assign
({}, state);
//Temporary
}
setState
(
state
) {
this
.
state
=
this
.
deepClone
(state); }
setDispatch
(
dispatch
) {
this
.
dispatch
= dispatch; }
getState
(
) {
return
this
.
state
; } }