@@ -11,12 +11,12 @@ describe('CommitBox', () => {
1111 describe ( '#checkReadyForSubmit()' , ( ) => {
1212 it ( 'should update commit box state to be ready when changes are staged' , ( ) => {
1313 const box = new CommitBox ( {
14- commitFunc : async ( ) => { } ,
15- hasFiles : true ,
16- settings : { composite : { } } as any
14+ onCommit : async ( ) => { } ,
15+ hasFiles : true
1716 } ) ;
1817
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 ) ;
2020
2121 let expected = classes (
2222 stagedCommitButtonStyle ,
@@ -27,29 +27,29 @@ describe('CommitBox', () => {
2727
2828 it ( 'should update commit box state to be disabled when no changes are staged' , ( ) => {
2929 const box = new CommitBox ( {
30- commitFunc : async ( ) => { } ,
31- hasFiles : true ,
32- settings : { composite : { } } as any
30+ onCommit : async ( ) => { } ,
31+ hasFiles : true
3332 } ) ;
3433
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 ) ;
3636 let expected = classes (
3737 stagedCommitButtonStyle ,
3838 stagedCommitButtonDisabledStyle
3939 ) ;
4040 expect ( actual ) . toEqual ( expected ) ;
4141 } ) ;
4242
43- it ( 'should be ready to commit with a message set. ' , ( ) => {
43+ it ( 'should be ready to commit with a message set' , ( ) => {
4444 const box = new CommitBox ( {
45- commitFunc : async ( ) => { } ,
46- hasFiles : true ,
47- settings : { composite : { } } as any
45+ onCommit : async ( ) => { } ,
46+ hasFiles : true
4847 } ) ;
4948 // can't use setState here, since the box hasn't actually mounted
5049 box . state = { value : 'message' } ;
5150
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 ) ;
5353 let expected = stagedCommitButtonStyle ;
5454 expect ( actual ) . toEqual ( expected ) ;
5555 } ) ;
0 commit comments