@@ -2072,7 +2072,7 @@ it.layer(layerTest)("GitVcsDriver core integration", (it) => {
20722072 for ( const baseRef of [ "upstream/main" , "canonical/team/main" , "release/v2" ] ) {
20732073 yield * git ( cwd , [ "config" , "branch.feature/configured-base.gh-merge-base" , baseRef ] ) ;
20742074 const status = yield * driver . statusDetailsLocal ( cwd , { includeBranchChanges : true } ) ;
2075- assert . deepStrictEqual ( status . branchChanges , { baseRef, insertions : 1 , deletions : 0 } ) ;
2075+ assert . deepInclude ( status . branchChanges , { baseRef, insertions : 1 , deletions : 0 } ) ;
20762076 assert . strictEqual ( status . aheadCount , 1 ) ;
20772077 const preview = yield * driver . getReviewDiffPreview ( { cwd } ) ;
20782078 const changes = preview . sources . find ( ( source ) => source . kind === "branch-range" ) ! ;
@@ -2085,7 +2085,7 @@ it.layer(layerTest)("GitVcsDriver core integration", (it) => {
20852085 for ( const baseRef of [ "origin/main" , "upstream/missing" , "main" ] ) {
20862086 yield * git ( cwd , [ "config" , "branch.feature/configured-base.gh-merge-base" , baseRef ] ) ;
20872087 const status = yield * driver . statusDetailsLocal ( cwd , { includeBranchChanges : true } ) ;
2088- assert . deepStrictEqual ( status . branchChanges , {
2088+ assert . deepInclude ( status . branchChanges , {
20892089 baseRef : "origin/main" ,
20902090 insertions : 2 ,
20912091 deletions : 0 ,
@@ -2102,7 +2102,7 @@ it.layer(layerTest)("GitVcsDriver core integration", (it) => {
21022102 for ( const shadowRef of [ "refs/heads/upstream/main" , "refs/tags/upstream/main" ] ) {
21032103 yield * git ( cwd , [ "update-ref" , shadowRef , "HEAD~2" ] ) ;
21042104 const status = yield * driver . statusDetailsLocal ( cwd , { includeBranchChanges : true } ) ;
2105- assert . deepStrictEqual ( status . branchChanges , {
2105+ assert . deepInclude ( status . branchChanges , {
21062106 baseRef : "refs/remotes/upstream/main" ,
21072107 insertions : 2 ,
21082108 deletions : 1 ,
@@ -2155,7 +2155,7 @@ it.layer(layerTest)("GitVcsDriver core integration", (it) => {
21552155 }
21562156 const baseRef = configuredBase ?? "main" ;
21572157 const status = yield * driver . statusDetailsLocal ( cwd , { includeBranchChanges : true } ) ;
2158- assert . deepStrictEqual ( status . branchChanges , { baseRef, insertions : 1 , deletions : 0 } ) ;
2158+ assert . deepInclude ( status . branchChanges , { baseRef, insertions : 1 , deletions : 0 } ) ;
21592159 assert . strictEqual ( status . aheadCount , 1 ) ;
21602160 const preview = yield * driver . getReviewDiffPreview ( { cwd } ) ;
21612161 const changes = preview . sources . find ( ( source ) => source . kind === "branch-range" ) ! ;
@@ -2243,7 +2243,7 @@ it.layer(layerTest)("GitVcsDriver core integration", (it) => {
22432243 { path : "new.txt" , previousPath : null , additions : 2 , deletions : 0 } ,
22442244 ] ) ;
22452245 const status = yield * driver . statusDetailsLocal ( cwd , { includeBranchChanges : true } ) ;
2246- assert . deepStrictEqual ( status . branchChanges , {
2246+ assert . deepInclude ( status . branchChanges , {
22472247 baseRef : null ,
22482248 insertions : 2 ,
22492249 deletions : 0 ,
@@ -2329,7 +2329,7 @@ it.layer(layerTest)("GitVcsDriver core integration", (it) => {
23292329 assert . notEqual ( defaultStat , minimalStat ) ;
23302330 const [ insertions , deletions ] = defaultStat . split ( "\t" ) ;
23312331 const status = yield * driver . statusDetailsLocal ( cwd , { includeBranchChanges : true } ) ;
2332- assert . deepStrictEqual ( status . branchChanges , {
2332+ assert . deepInclude ( status . branchChanges , {
23332333 baseRef : initialBranch ,
23342334 insertions : Number ( insertions ) ,
23352335 deletions : Number ( deletions ) ,
@@ -2402,15 +2402,26 @@ it.layer(layerTest)("GitVcsDriver core integration", (it) => {
24022402 yield * writeTextFile ( cwd , "README.md" , "# test\ncommitted\n" ) ;
24032403 yield * git ( cwd , [ "commit" , "-am" , "commit edit" ] ) ;
24042404 yield * writeTextFile ( cwd , "nested/untracked.txt" , "one\ntwo\n" ) ;
2405+ yield * writeTextFile ( cwd , "src/code.ts" , "export const value = 1;\n" ) ;
2406+ yield * writeTextFile ( cwd , "src/code.test.ts" , "test\n" ) ;
2407+ yield * writeTextFile ( cwd , "__mocks__/value.ts" , "mock\n" ) ;
2408+ yield * writeTextFile ( cwd , "pnpm-lock.yaml" , "lock\n" ) ;
24052409
24062410 const status = yield * driver . statusDetailsLocal ( pathService . join ( cwd , "nested" ) , {
24072411 includeBranchChanges : true ,
24082412 } ) ;
2409- assert . deepStrictEqual ( status . branchChanges , {
2413+ assert . deepInclude ( status . branchChanges , {
24102414 baseRef : "main" ,
2411- insertions : 3 ,
2415+ insertions : 7 ,
24122416 deletions : 0 ,
24132417 } ) ;
2418+ assert . deepStrictEqual ( status . branchChanges ?. breakdown , {
2419+ code : { additions : 1 , deletions : 0 } ,
2420+ tests : { additions : 1 , deletions : 0 } ,
2421+ mocks : { additions : 1 , deletions : 0 } ,
2422+ generated : { additions : 1 , deletions : 0 } ,
2423+ docs : { additions : 3 , deletions : 0 } ,
2424+ } ) ;
24142425 assert . isUndefined ( ( yield * driver . statusDetailsLocal ( cwd ) ) . branchChanges ) ;
24152426 } ) ,
24162427 ) ;
@@ -2438,7 +2449,7 @@ it.layer(layerTest)("GitVcsDriver core integration", (it) => {
24382449 yield * git ( cwd , [ "branch" , "--set-upstream-to=upstream/main" , "main" ] ) ;
24392450
24402451 const status = yield * driver . statusDetailsLocal ( cwd , { includeBranchChanges : true } ) ;
2441- assert . deepStrictEqual ( status . branchChanges , {
2452+ assert . deepInclude ( status . branchChanges , {
24422453 baseRef : "upstream/main" ,
24432454 insertions : 0 ,
24442455 deletions : 0 ,
@@ -2451,7 +2462,7 @@ it.layer(layerTest)("GitVcsDriver core integration", (it) => {
24512462 // Without an upstream the primary remote's copy stays the base.
24522463 yield * git ( cwd , [ "branch" , "--unset-upstream" , "main" ] ) ;
24532464 const untracked = yield * driver . statusDetailsLocal ( cwd , { includeBranchChanges : true } ) ;
2454- assert . deepStrictEqual ( untracked . branchChanges , {
2465+ assert . deepInclude ( untracked . branchChanges , {
24552466 baseRef : "origin/main" ,
24562467 insertions : 3 ,
24572468 deletions : 0 ,
@@ -2475,7 +2486,7 @@ it.layer(layerTest)("GitVcsDriver core integration", (it) => {
24752486 ) ;
24762487
24772488 const status = yield * driver . statusDetailsLocal ( cwd , { includeBranchChanges : true } ) ;
2478- assert . deepStrictEqual ( status . branchChanges , {
2489+ assert . deepInclude ( status . branchChanges , {
24792490 baseRef : "main" ,
24802491 insertions : 2_002 ,
24812492 deletions : 0 ,
0 commit comments