@@ -251,7 +251,7 @@ describe("resolveAutoFeatureBranchName", () => {
251251
252252describe ( "resolveChangesTotals" , ( ) => {
253253 it ( "does not let an empty branchChanges hide a dirty working tree" , ( ) => {
254- assert . deepEqual (
254+ assert . deepInclude (
255255 resolveChangesTotals (
256256 status ( {
257257 hasWorkingTreeChanges : true ,
@@ -263,37 +263,28 @@ describe("resolveChangesTotals", () => {
263263 } ,
264264 } ) ,
265265 ) ,
266- { insertions : 5 , deletions : 1 , baseRef : null } ,
266+ { insertions : 5 , deletions : 1 } ,
267267 ) ;
268268 } ) ;
269269
270270 it ( "keeps non-zero branchChanges over the working tree" , ( ) => {
271271 assert . deepEqual (
272272 resolveChangesTotals (
273273 status ( {
274- branchChanges : { baseRef : "main " , insertions : 20 , deletions : 3 } ,
274+ branchChanges : { baseRef : "origin/master " , insertions : 20 , deletions : 3 } ,
275275 workingTree : {
276276 files : [ { path : "a.ts" , insertions : 1 , deletions : 0 } ] ,
277277 insertions : 1 ,
278278 deletions : 0 ,
279279 } ,
280280 } ) ,
281281 ) ,
282- { insertions : 20 , deletions : 3 , baseRef : "main" } ,
283- ) ;
284- } ) ;
285-
286- it ( "keeps the branch base when the branch and working tree are clean" , ( ) => {
287- assert . deepEqual (
288- resolveChangesTotals (
289- status ( { branchChanges : { baseRef : "origin/master" , insertions : 0 , deletions : 0 } } ) ,
290- ) ,
291- { insertions : 0 , deletions : 0 , baseRef : "origin/master" } ,
282+ { insertions : 20 , deletions : 3 , baseRef : "origin/master" } ,
292283 ) ;
293284 } ) ;
294285
295286 it ( "falls back to the working tree when branchChanges is omitted" , ( ) => {
296- assert . deepEqual (
287+ assert . deepInclude (
297288 resolveChangesTotals (
298289 status ( {
299290 workingTree : {
@@ -303,7 +294,7 @@ describe("resolveChangesTotals", () => {
303294 } ,
304295 } ) ,
305296 ) ,
306- { insertions : 2 , deletions : 0 , baseRef : null } ,
297+ { insertions : 2 , deletions : 0 } ,
307298 ) ;
308299 } ) ;
309300} ) ;
0 commit comments