@@ -12,8 +12,8 @@ import sinon from 'sinon';
12
12
import { TaskInputField , StyledTaskInputField } from './TaskInputField' ;
13
13
import { mockReduxStore , radioTypeAnnotation } from '../../testHelpers' ;
14
14
15
- describe ( 'TaskInputField' , function ( ) {
16
- describe ( 'render' , function ( ) {
15
+ describe ( 'TaskInputField' , function ( ) {
16
+ describe ( 'render' , function ( ) {
17
17
let wrapper ;
18
18
before ( function ( ) {
19
19
wrapper = mount ( < TaskInputField annotation = { radioTypeAnnotation } index = { 0 } type = "radio" /> , mockReduxStore ) ;
@@ -39,24 +39,24 @@ describe('TaskInputField', function() {
39
39
wrapper . setProps ( { className : 'active' } ) ;
40
40
expect ( wrapper . props ( ) . className ) . to . include ( 'active' ) ;
41
41
} ) ;
42
- } )
42
+ } ) ;
43
43
44
44
45
- describe ( 'onChange method' , function ( ) {
45
+ describe ( 'onChange method' , function ( ) {
46
46
let onChangePropsSpy ;
47
47
let wrapper ;
48
- before ( function ( ) {
48
+ before ( function ( ) {
49
49
onChangePropsSpy = sinon . spy ( ) ;
50
50
wrapper = mount ( < TaskInputField annotation = { radioTypeAnnotation } onChange = { onChangePropsSpy } index = { 0 } type = "radio" /> , mockReduxStore ) ;
51
51
} ) ;
52
52
53
- afterEach ( function ( ) {
53
+ afterEach ( function ( ) {
54
54
onChangePropsSpy . resetHistory ( ) ;
55
55
} ) ;
56
56
57
- it ( 'should call onChange when the on change event is fired' , function ( ) {
57
+ it ( 'should call onChange when the on change event is fired' , function ( ) {
58
58
wrapper . find ( 'input' ) . simulate ( 'change' ) ;
59
- expect ( onChangePropsSpy . calledOnce ) . to . be . true ;
59
+ expect ( onChangePropsSpy ) . to . have . been . calledOnce ;
60
60
} ) ;
61
61
} ) ;
62
62
} ) ;
0 commit comments