Skip to content

Commit 0a75938

Browse files
committed
fix tests
1 parent ed81a55 commit 0a75938

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/amazonq/test/unit/amazonq/apps/inline/completion.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55
import sinon from 'sinon'
6-
import { CancellationToken, commands, languages, Position } from 'vscode'
6+
import { CancellationToken, commands, languages, Position, window } from 'vscode'
77
import assert from 'assert'
88
import { LanguageClient } from 'vscode-languageclient'
99
import { AmazonQInlineCompletionItemProvider, InlineCompletionManager } from '../../../../../src/app/inline/completion'
@@ -291,6 +291,7 @@ describe('InlineCompletionManager', () => {
291291
getActiveRecommendationStub.returns(mockSuggestions)
292292
getAllRecommendationsStub = sandbox.stub(recommendationService, 'getAllRecommendations')
293293
getAllRecommendationsStub.resolves()
294+
sandbox.stub(window, 'activeTextEditor').value(createMockTextEditor())
294295
}),
295296
it('should call recommendation service to get new suggestions for new sessions', async () => {
296297
provider = new AmazonQInlineCompletionItemProvider(

0 commit comments

Comments
 (0)