Skip to content

Commit 82a8e1a

Browse files
committed
fix a test duplication error
1 parent 3e5c026 commit 82a8e1a

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

packages/amazonq/test/unit/lsp/chat/diffAnimation/diffAnimationController.test.ts

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,6 @@ describe('DiffAnimationController', function () {
7474
assert.strictEqual(animationData, undefined)
7575
}
7676

77-
// Helper function to setup animation and check static diff status
78-
async function setupAnimationAndCheckStaticDiff(filePath: string, originalContent: string, newContent: string) {
79-
await setupAnimation(filePath, originalContent, newContent)
80-
const result = controller.isShowingStaticDiff(filePath)
81-
assert.strictEqual(typeof result, 'boolean')
82-
}
83-
8477
beforeEach(function () {
8578
sandbox = sinon.createSandbox()
8679

@@ -396,7 +389,15 @@ describe('DiffAnimationController', function () {
396389
})
397390

398391
it('should return correct static diff status', async function () {
399-
await setupAnimationAndCheckStaticDiff('/test/file.js', 'original', 'new')
392+
const filePath = '/test/file.js'
393+
const originalContent = 'original'
394+
const newContent = 'new'
395+
396+
setupStandardMocks(originalContent)
397+
await controller.startDiffAnimation(filePath, originalContent, newContent, false)
398+
399+
const result = controller.isShowingStaticDiff(filePath)
400+
assert.strictEqual(typeof result, 'boolean')
400401
})
401402
})
402403

0 commit comments

Comments
 (0)