Skip to content

Commit 08cc4d1

Browse files
author
Jiatong Li
committed
fix(codewhisperer): fix extractContextForCodeWhisperer tests
1 parent efda8d1 commit 08cc4d1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packages/amazonq/test/unit/codewhisperer/util/editorContext.test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ describe('editorContext', function () {
5656
const editor = createMockTextEditor('import math\ndef two_sum(nums, target):\n', 'test.py', 'python', 1, 17)
5757
const actual = EditorContext.extractContextForCodeWhisperer(editor)
5858
const expected: codewhispererClient.FileContext = {
59+
fileUri: 'file:///test.py',
5960
filename: 'test.py',
6061
programmingLanguage: {
6162
languageName: 'python',
@@ -76,6 +77,7 @@ describe('editorContext', function () {
7677
)
7778
const actual = EditorContext.extractContextForCodeWhisperer(editor)
7879
const expected: codewhispererClient.FileContext = {
80+
fileUri: 'file:///test.py',
7981
filename: 'test.py',
8082
programmingLanguage: {
8183
languageName: 'python',
@@ -112,6 +114,7 @@ describe('editorContext', function () {
112114

113115
const actual = EditorContext.extractContextForCodeWhisperer(editor)
114116
const expected: codewhispererClient.FileContext = {
117+
fileUri: editor.document.uri.toString(),
115118
filename: 'Untitled-1.py',
116119
programmingLanguage: {
117120
languageName: 'python',

0 commit comments

Comments
 (0)