@@ -51,8 +51,13 @@ test('executes gitDiff', async () => {
5151 )
5252 expect ( results . files [ 0 ] . chunks [ 0 ] . changes [ 2 ] . type ) . toBe ( 'DeletedLine' )
5353
54- expect ( infoMock ) . toHaveBeenCalledWith ( 'total files changed (raw diff): 5' )
55- expect ( infoMock ) . toHaveBeenCalledWith ( 'total files changed (json diff): 5' )
54+ expect ( infoMock ) . toHaveBeenCalledWith ( '🏃 starting the git-diff-action' )
55+ expect ( infoMock ) . toHaveBeenCalledWith (
56+ '🧮 total detected files changed (raw diff): 5'
57+ )
58+ expect ( infoMock ) . toHaveBeenCalledWith (
59+ '🧮 total detected files changed (json diff): 5'
60+ )
5661} )
5762
5863test ( 'executes gitDiff with binary files' , async ( ) => {
@@ -76,11 +81,16 @@ test('executes gitDiff with binary files', async () => {
7681 expect ( results . files [ 0 ] . chunks [ 0 ] . changes [ 2 ] . type ) . toBe ( 'DeletedLine' )
7782
7883 expect ( results . files . length ) . toBe ( 7 )
84+ expect ( infoMock ) . toHaveBeenCalledWith ( '🏃 starting the git-diff-action' )
85+ expect ( infoMock ) . toHaveBeenCalledWith (
86+ '📂 reading git diff from file: __tests__/fixtures/with-binary-files.diff'
87+ )
88+ expect ( infoMock ) . toHaveBeenCalledWith (
89+ '🧮 total detected files changed (raw diff): 7'
90+ )
7991 expect ( infoMock ) . toHaveBeenCalledWith (
80- 'reading git diff from file: __tests__/fixtures/with-binary-files. diff'
92+ '🧮 total detected files changed (json diff): 7 '
8193 )
82- expect ( infoMock ) . toHaveBeenCalledWith ( 'total files changed (raw diff): 7' )
83- expect ( infoMock ) . toHaveBeenCalledWith ( 'total files changed (json diff): 7' )
8494} )
8595
8696// this test case is a bug test
@@ -99,13 +109,18 @@ test('executes gitDiff with binary files and --binary flag and breaks (bug test)
99109 expect ( lastFile . path ) . toBe ( 'kv-cache.js' )
100110
101111 expect ( results . files . length ) . toBe ( 4 )
112+ expect ( infoMock ) . toHaveBeenCalledWith ( '🏃 starting the git-diff-action' )
102113 expect ( infoMock ) . toHaveBeenCalledWith (
103- 'reading git diff from file: __tests__/fixtures/with-binary-files-and-binary-flag.diff'
114+ '📂 reading git diff from file: __tests__/fixtures/with-binary-files-and-binary-flag.diff'
104115 )
105116
106117 // note that the total files changed is 7, but the json diff only has 4 files
107- expect ( infoMock ) . toHaveBeenCalledWith ( 'total files changed (raw diff): 7' )
108- expect ( infoMock ) . toHaveBeenCalledWith ( 'total files changed (json diff): 4' )
118+ expect ( infoMock ) . toHaveBeenCalledWith (
119+ '🧮 total detected files changed (raw diff): 7'
120+ )
121+ expect ( infoMock ) . toHaveBeenCalledWith (
122+ '🧮 total detected files changed (json diff): 4'
123+ )
109124} )
110125
111126test ( 'executes gitDiff by using the git binary' , async ( ) => {
@@ -150,8 +165,12 @@ test('executes gitDiff by using the git binary', async () => {
150165 expect ( infoMock ) . toHaveBeenCalledWith (
151166 'max_buffer_size is not defined, using default of 1000000'
152167 )
153- expect ( infoMock ) . toHaveBeenCalledWith ( 'total files changed (raw diff): 5' )
154- expect ( infoMock ) . toHaveBeenCalledWith ( 'total files changed (json diff): 5' )
168+ expect ( infoMock ) . toHaveBeenCalledWith (
169+ '🧮 total detected files changed (raw diff): 5'
170+ )
171+ expect ( infoMock ) . toHaveBeenCalledWith (
172+ '🧮 total detected files changed (json diff): 5'
173+ )
155174 expect ( debugMock ) . toHaveBeenCalledWith (
156175 'running git diff command: git --no-pager diff --no-color --full-index HEAD^1 .'
157176 )
0 commit comments