@@ -71,6 +71,13 @@ describe('DiffAnimationController', function () {
7171 assert . strictEqual ( animationData , undefined )
7272 }
7373
74+ // Helper function to setup animation and check static diff status
75+ async function setupAnimationAndCheckStaticDiff ( filePath : string , originalContent : string , newContent : string ) {
76+ await setupAnimation ( filePath , originalContent , newContent )
77+ const result = controller . isShowingStaticDiff ( filePath )
78+ assert . strictEqual ( typeof result , 'boolean' )
79+ }
80+
7481 beforeEach ( function ( ) {
7582 sandbox = sinon . createSandbox ( )
7683
@@ -348,15 +355,7 @@ describe('DiffAnimationController', function () {
348355 } )
349356
350357 it ( 'should return correct static diff status' , async function ( ) {
351- const filePath = '/test/file.js'
352- const originalContent = 'original'
353- const newContent = 'new'
354-
355- setupStandardMocks ( originalContent )
356- await controller . startDiffAnimation ( filePath , originalContent , newContent , false )
357-
358- const result = controller . isShowingStaticDiff ( filePath )
359- assert . strictEqual ( typeof result , 'boolean' )
358+ await setupAnimationAndCheckStaticDiff ( '/test/file.js' , 'original' , 'new' )
360359 } )
361360 } )
362361
0 commit comments