@@ -12,7 +12,8 @@ describe('CommitBox', () => {
12
12
it ( 'should update commit box state to be ready when changes are staged' , ( ) => {
13
13
const box = new CommitBox ( {
14
14
commitFunc : async ( ) => { } ,
15
- hasFiles : true
15
+ hasFiles : true ,
16
+ settings : { composite : { } } as any
16
17
} ) ;
17
18
18
19
let actual = box . commitButtonStyle ( true ) ;
@@ -27,7 +28,8 @@ describe('CommitBox', () => {
27
28
it ( 'should update commit box state to be disabled when no changes are staged' , ( ) => {
28
29
const box = new CommitBox ( {
29
30
commitFunc : async ( ) => { } ,
30
- hasFiles : true
31
+ hasFiles : true ,
32
+ settings : { composite : { } } as any
31
33
} ) ;
32
34
33
35
let actual = box . commitButtonStyle ( false ) ;
@@ -41,19 +43,14 @@ describe('CommitBox', () => {
41
43
it ( 'should be ready to commit with a message set.' , ( ) => {
42
44
const box = new CommitBox ( {
43
45
commitFunc : async ( ) => { } ,
44
- hasFiles : true
46
+ hasFiles : true ,
47
+ settings : { composite : { } } as any
45
48
} ) ;
46
- box . setState (
47
- {
48
- value : 'message'
49
- } ,
50
- ( ) => {
51
- let actual = box . commitButtonStyle ( true ) ;
49
+ box . state = { value : 'message' } ;
52
50
53
- let expected = stagedCommitButtonStyle ;
54
- expect ( actual ) . toEqual ( expected ) ;
55
- }
56
- ) ;
51
+ let actual = box . commitButtonStyle ( true ) ;
52
+ let expected = stagedCommitButtonStyle ;
53
+ expect ( actual ) . toEqual ( expected ) ;
57
54
} ) ;
58
55
} ) ;
59
56
} ) ;
0 commit comments