@@ -11,12 +11,12 @@ describe('CommitBox', () => {
11
11
describe ( '#checkReadyForSubmit()' , ( ) => {
12
12
it ( 'should update commit box state to be ready when changes are staged' , ( ) => {
13
13
const box = new CommitBox ( {
14
- commitFunc : async ( ) => { } ,
15
- hasFiles : true ,
16
- settings : { composite : { } } as any
14
+ onCommit : async ( ) => { } ,
15
+ hasFiles : true
17
16
} ) ;
18
17
19
- let actual = box . commitButtonStyle ( true ) ;
18
+ // TODO: this sort of testing should be performed during UI/UX testing, not unit testing
19
+ let actual = box . _commitButtonStyle ( true ) ;
20
20
21
21
let expected = classes (
22
22
stagedCommitButtonStyle ,
@@ -27,29 +27,29 @@ describe('CommitBox', () => {
27
27
28
28
it ( 'should update commit box state to be disabled when no changes are staged' , ( ) => {
29
29
const box = new CommitBox ( {
30
- commitFunc : async ( ) => { } ,
31
- hasFiles : true ,
32
- settings : { composite : { } } as any
30
+ onCommit : async ( ) => { } ,
31
+ hasFiles : true
33
32
} ) ;
34
33
35
- let actual = box . commitButtonStyle ( false ) ;
34
+ // TODO: this sort of testing should be performed during UI/UX testing, not unit testing
35
+ let actual = box . _commitButtonStyle ( false ) ;
36
36
let expected = classes (
37
37
stagedCommitButtonStyle ,
38
38
stagedCommitButtonDisabledStyle
39
39
) ;
40
40
expect ( actual ) . toEqual ( expected ) ;
41
41
} ) ;
42
42
43
- it ( 'should be ready to commit with a message set. ' , ( ) => {
43
+ it ( 'should be ready to commit with a message set' , ( ) => {
44
44
const box = new CommitBox ( {
45
- commitFunc : async ( ) => { } ,
46
- hasFiles : true ,
47
- settings : { composite : { } } as any
45
+ onCommit : async ( ) => { } ,
46
+ hasFiles : true
48
47
} ) ;
49
48
// can't use setState here, since the box hasn't actually mounted
50
49
box . state = { value : 'message' } ;
51
50
52
- let actual = box . commitButtonStyle ( true ) ;
51
+ // TODO: this sort of testing should be performed during UI/UX testing, not unit testing
52
+ let actual = box . _commitButtonStyle ( true ) ;
53
53
let expected = stagedCommitButtonStyle ;
54
54
expect ( actual ) . toEqual ( expected ) ;
55
55
} ) ;
0 commit comments