Skip to content

Commit 20d5180

Browse files
committed
tst
1 parent e6e5fbe commit 20d5180

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

plugins/amazonq/codewhisperer/jetbrains-community/tst/software/aws/toolkits/jetbrains/services/codewhisperer/CodeWhispererFileContextProviderTest.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ class CodeWhispererFileContextProviderTest {
419419
}
420420

421421
@Test
422-
fun `extractSupplementalFileContext from src file should extract src`() = runTest {
422+
fun `extractSupplementalFileContext should return opentabs context if project context is empty`() = runTest {
423423
mockProjectContext.stub { onBlocking { queryInline(any(), any()) }.doReturn(emptyList()) }
424424
val files = NaiveSampleCase.setupFixture(fixture)
425425
val queryPsi = files[0]
@@ -437,6 +437,10 @@ class CodeWhispererFileContextProviderTest {
437437
assertThat(supplementalContext?.contents)
438438
.isNotNull
439439
.isNotEmpty
440+
441+
assertThat(supplementalContext?.strategy)
442+
.isNotNull
443+
.isEqualTo(CrossFileStrategy.OpenTabsBM25)
440444
verify(sut).extractSupplementalFileContextForSrc(any(), any())
441445
verify(sut, times(0)).extractSupplementalFileContextForTst(any(), any())
442446
}

0 commit comments

Comments
 (0)