File tree Expand file tree Collapse file tree 1 file changed +2
-12
lines changed
completions/src/test/kotlin/lsp Expand file tree Collapse file tree 1 file changed +2
-12
lines changed Original file line number Diff line number Diff line change @@ -32,22 +32,12 @@ class LspClientTest : CompletionTest {
3232 fun `LSP client should provide completions for libs declared in build file (kotlinx-coroutines)` () = runBlocking {
3333 val snippet =
3434 """
35+ import kotlinx.coroutines.runBlocking
3536 fun main() {
3637 runBlock$CARET_MARKER
3738 }
3839 """ .trimIndent()
39- checkCompletions(snippet, listOf (" runBlocking" ))
40- }
41-
42- private fun checkCompletions (snippet : String , expectedLabels : List <String >) = runBlocking {
43- val (code, position) = extractCaret { snippet }
44- val uri = randomResourceUri
45- client.openDocument(uri, code)
46- val completions = client.getCompletion(uri, position).await()
47- assertAll(
48- { assertTrue { completions.isNotEmpty() } },
49- { assertTrue(completions.map { it.label }.containsAll(expectedLabels)) },
50- )
40+ performCompletionChecks(snippet, listOf (" runBlocking" ))
5141 }
5242
5343 @AfterEach
You can’t perform that action at this time.
0 commit comments