@@ -15,7 +15,7 @@ describe('swiftorg sync validation', () => {
1515 const swiftorg = new Swiftorg ( true )
1616 await swiftorg . update ( )
1717 expect ( rmdirSpy ) . not . toHaveBeenCalled ( )
18- expect ( execSpy ) . toHaveBeenCalledTimes ( 3 )
18+ expect ( execSpy ) . toHaveBeenCalledTimes ( 2 )
1919 const gitArgs = [
2020 'submodule' ,
2121 'update' ,
@@ -24,7 +24,7 @@ describe('swiftorg sync validation', () => {
2424 '--remote' ,
2525 '--merge'
2626 ]
27- expect ( execSpy . mock . calls [ 2 ] ) . toStrictEqual ( [
27+ expect ( execSpy . mock . calls [ 1 ] ) . toStrictEqual ( [
2828 'git' ,
2929 gitArgs ,
3030 { cwd : MODULE_DIR }
@@ -38,9 +38,9 @@ describe('swiftorg sync validation', () => {
3838 const swiftorg = new Swiftorg ( false )
3939 await swiftorg . update ( )
4040 expect ( rmdirSpy ) . not . toHaveBeenCalled ( )
41- expect ( execSpy ) . toHaveBeenCalledTimes ( 3 )
42- const gitArgs = [ 'submodule' , 'update' ]
43- expect ( execSpy . mock . calls [ 2 ] ) . toStrictEqual ( [
41+ expect ( execSpy ) . toHaveBeenCalledTimes ( 2 )
42+ const gitArgs = [ 'submodule' , 'update' , '--init' ]
43+ expect ( execSpy . mock . calls [ 1 ] ) . toStrictEqual ( [
4444 'git' ,
4545 gitArgs ,
4646 { cwd : MODULE_DIR }
@@ -54,7 +54,7 @@ describe('swiftorg sync validation', () => {
5454 const swiftorg = new Swiftorg ( true )
5555 await swiftorg . update ( )
5656 expect ( rmdirSpy ) . toHaveBeenCalled ( )
57- expect ( execSpy ) . toHaveBeenCalledTimes ( 4 )
57+ expect ( execSpy ) . toHaveBeenCalledTimes ( 3 )
5858 } )
5959
6060 it ( 'tests without latest sync failure with empty swiftorg' , async ( ) => {
@@ -64,7 +64,7 @@ describe('swiftorg sync validation', () => {
6464 const swiftorg = new Swiftorg ( false )
6565 await swiftorg . update ( )
6666 expect ( rmdirSpy ) . toHaveBeenCalled ( )
67- expect ( execSpy ) . toHaveBeenCalledTimes ( 5 )
67+ expect ( execSpy ) . toHaveBeenCalledTimes ( 4 )
6868 } )
6969
7070 it ( 'tests latest sync failure with no swiftorg' , async ( ) => {
@@ -74,7 +74,7 @@ describe('swiftorg sync validation', () => {
7474 const swiftorg = new Swiftorg ( true )
7575 await swiftorg . update ( )
7676 expect ( rmdirSpy ) . not . toHaveBeenCalled ( )
77- expect ( execSpy ) . toHaveBeenCalledTimes ( 4 )
77+ expect ( execSpy ) . toHaveBeenCalledTimes ( 3 )
7878 } )
7979
8080 it ( 'tests without latest sync failure with no swiftorg' , async ( ) => {
@@ -84,7 +84,7 @@ describe('swiftorg sync validation', () => {
8484 const swiftorg = new Swiftorg ( false )
8585 await swiftorg . update ( )
8686 expect ( rmdirSpy ) . not . toHaveBeenCalled ( )
87- expect ( execSpy ) . toHaveBeenCalledTimes ( 5 )
87+ expect ( execSpy ) . toHaveBeenCalledTimes ( 4 )
8888 } )
8989
9090 it ( 'tests without latest sync failure with empty swiftorg and no commit in package.json' , async ( ) => {
@@ -95,7 +95,7 @@ describe('swiftorg sync validation', () => {
9595 const swiftorg = new Swiftorg ( false )
9696 await swiftorg . update ( )
9797 expect ( rmdirSpy ) . toHaveBeenCalled ( )
98- expect ( execSpy ) . toHaveBeenCalledTimes ( 4 )
98+ expect ( execSpy ) . toHaveBeenCalledTimes ( 3 )
9999 } )
100100
101101 it ( 'tests without latest sync failure with no swiftorg and no commit in package.json' , async ( ) => {
@@ -106,6 +106,6 @@ describe('swiftorg sync validation', () => {
106106 const swiftorg = new Swiftorg ( false )
107107 await swiftorg . update ( )
108108 expect ( rmdirSpy ) . not . toHaveBeenCalled ( )
109- expect ( execSpy ) . toHaveBeenCalledTimes ( 4 )
109+ expect ( execSpy ) . toHaveBeenCalledTimes ( 3 )
110110 } )
111111} )
0 commit comments