Skip to content

Commit 214fbbc

Browse files
authored
fix(tests): duplicate messages in featureDev tests #4344
Problem: - the beforeEach registers a framework which accepts requests. If we don't dispose before building a new one we get duplicate chat messages because theres two message listeners registered Solution: - dipose of the first framework instance before creating the second framwork instance
1 parent 37022d1 commit 214fbbc

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/testE2E/amazonq/featureDev.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ describe('Amazon Q Feature Dev', function () {
6262
})
6363

6464
it('Does NOT show /dev when feature dev is NOT enabled', () => {
65+
// The beforeEach registers a framework which accepts requests. If we don't dispose before building a new one we have duplicate messages
66+
framework.dispose()
6567
framework = new qTestingFramework('featuredev', false, true)
6668
const q = framework.createTab()
6769
const command = q.findCommand('/dev')

0 commit comments

Comments
 (0)