@@ -52,12 +52,6 @@ describe('DiffAnimationController', function () {
5252 ; ( vscode . workspace . openTextDocument as sinon . SinonStub ) . rejects ( new Error ( errorMessage ) )
5353 }
5454
55- // Helper function to setup animation
56- async function setupAnimation ( filePath : string , originalContent : string , newContent : string ) {
57- setupStandardMocks ( originalContent )
58- await controller . startDiffAnimation ( filePath , originalContent , newContent , false )
59- }
60-
6155 beforeEach ( function ( ) {
6256 sandbox = sinon . createSandbox ( )
6357
@@ -303,14 +297,21 @@ describe('DiffAnimationController', function () {
303297
304298 describe ( 'stopDiffAnimation' , function ( ) {
305299 it ( 'should stop animation for specific file' , async function ( ) {
306- const filePath = '/test/file.js'
307- const originalContent = 'original '
308- const newContent = 'new '
300+ const filePath = '/test/specific- file.js'
301+ const originalContent = 'test content '
302+ const newContent = 'modified content '
309303
310- await setupAnimation ( filePath , originalContent , newContent )
304+ setupStandardMocks ( originalContent )
305+ await controller . startDiffAnimation ( filePath , originalContent , newContent , false )
306+
307+ // Verify animation is running
308+ assert . strictEqual ( controller . isAnimating ( filePath ) , true )
309+
310+ // Stop the animation
311311 controller . stopDiffAnimation ( filePath )
312- const animationData = controller . getAnimationData ( filePath )
313- assert . strictEqual ( animationData , undefined )
312+
313+ // Verify animation is stopped
314+ assert . strictEqual ( controller . isAnimating ( filePath ) , false )
314315 } )
315316
316317 it ( 'should handle stopping non-existent animation' , function ( ) {
0 commit comments