@@ -228,7 +228,7 @@ describe('ensureSharedHistory', () => {
228228 ` ) ;
229229 } ) ;
230230
231- it ( 'deepens history if needed' , ( ) => {
231+ it . only ( 'deepens history if needed' , ( ) => {
232232 const repo = repositoryFactory . cloneRepository ( { depth : 1 , branch : testBranch , singleBranch : true } ) ;
233233 gitSpy . mockClear ( ) ;
234234
@@ -242,18 +242,35 @@ describe('ensureSharedHistory', () => {
242242 verbose : true ,
243243 } ) ;
244244
245- const allLogs = logs . getMockLines ( 'all' ) ;
246- expect ( allLogs ) . toMatch ( 'Adding branch "master" to fetch config for remote "origin"' ) ;
247- expect ( allLogs ) . toMatch ( 'This is a shallow clone. Deepening to check for changes...' ) ;
248- expect ( allLogs ) . toMatch ( 'Deepening by 2 more commits (attempt 1/3)...' ) ;
249- expect ( allLogs ) . toMatch ( 'Deepening by 2 more commits (attempt 2/3)...' ) ;
250- expect ( allLogs ) . toMatch ( 'Deepening by 2 more commits (attempt 3/3)...' ) ;
251- expect ( allLogs ) . not . toMatch ( 'warning' ) ;
252- expect ( logs . mocks . warn ) . not . toHaveBeenCalled ( ) ;
253- expect ( logs . mocks . error ) . not . toHaveBeenCalled ( ) ;
245+ const allLogs = logs . getMockLines ( 'all' , {
246+ replacePaths : { [ repo . rootPath ] : '<root>' , [ repositoryFactory . originRoot ] : '<origin-dir>' } ,
247+ } ) ;
248+ expect ( allLogs ) . toMatchInlineSnapshot ( `
249+ "[log] Adding branch "master" to fetch config for remote "origin"
250+ [log] Fetching branch "master" from remote "origin" (with --depth=2)...
251+ [log] From <origin-dir>
252+ * branch master -> FETCH_HEAD
253+ * [new branch] master -> origin/master
254+ [log] Fetching branch "master" from remote "origin" (with --depth=2) completed successfully
255+ [log] This is a shallow clone. Deepening to check for changes...
256+ [log] Deepening by 2 more commits (attempt 1/3)...
257+ [log] Fetching branch "master" from remote "origin" (with --deepen=2)...
258+ [log] From <origin-dir>
259+ * branch master -> FETCH_HEAD
260+ [log] Fetching branch "master" from remote "origin" (with --deepen=2) completed successfully
261+ [log] Deepening by 2 more commits (attempt 2/3)...
262+ [log] Fetching branch "master" from remote "origin" (with --deepen=2)...
263+ [log] From <origin-dir>
264+ * branch master -> FETCH_HEAD
265+ [log] Fetching branch "master" from remote "origin" (with --deepen=2) completed successfully
266+ [log] Deepening by 2 more commits (attempt 3/3)...
267+ [log] Fetching branch "master" from remote "origin" (with --deepen=2)...
268+ [log] From <origin-dir>
269+ * branch master -> FETCH_HEAD
270+ [log] Fetching branch "master" from remote "origin" (with --deepen=2) completed successfully"
271+ ` ) ;
254272
255- expect ( filteredGitCalls ( ) . filter ( line => ! line . startsWith ( 'rev-parse' ) && ! line . startsWith ( 'merge-base' ) ) )
256- . toMatchInlineSnapshot ( `
273+ expect ( filteredGitCalls ( ) ) . toMatchInlineSnapshot ( `
257274 [
258275 "config --get-all remote.origin.fetch",
259276 "remote set-branches --add origin master",
0 commit comments