, . , .
, - . , , ) , .
, , . Redux .
. , - jasmine. : , , -.
, .
1.
( , -) : - , - ( SPA, ...). ReactJS , - (, props). , , , : , ( , ). , ReactJS .
, , , ( ) . , setState ; , setState ( - jasmine ), setState - . , .
2.
, , , . 1)
increment component.getInstance(), 2)
- . , - ( , ), , ( , , - ). , - increment ( , ), -, onClick - {increment} {() => if (this.state.count > 0) decrement();} .
, . ; , ( +) ( ), , . increment increment, increment , , ( ) - -; +, .
, . , ; , . ( ) , ; getInstance().onPlusButtonClick(). , event ( - ), . : , (event) => onTextChange(event.value) , , , , event .
, , , . , , , , , , , . , :)
3.
=) ? . ( CSS). , , jest ; , , DOM. . , .
, . , - . ( ). , , , ; , , . , : 1) , , , 2) ( , , , - , ).
. , , - , , - . , , .Net MVVM: ViewModel, view, view . ViewModel : , , . ViewModel , , , - , ViewModel , , ( ) , , , .
.1 , setState - , . - ViewModel, props, - X ViewModel, props setX f(x), viewModel.prop1 := x. , f(x) , - setState. , , state , , setState . - Redux.
. , . ViewModel ( ), - , , , . - gotoFirstPage(), , 1, , null ( ).
https://habrahabr.ru/post/332090/