mirror of
https://github.com/l0ng-ai/openidea.git
synced 2026-11-06 16:08:05 +00:00
test(lsp): smoke-test everyday code intelligence per language with real servers (#1299)
* test(lsp): smoke-test everyday code intelligence per language with real servers A new ide-host integration test drives completion, go to definition, Find Usages, hover, diagnostics with a quick fix, an intention, formatting and rename on each language's fixtures/ project, through the ops the app's commands call and the language server the app starts by default: TypeScript (vtsls), Python (basedpyright + Ruff), Rust (rust-analyzer), Go (gopls), Java (jdtls) and Kotlin (kotlin-lsp). A failure names the language and the operation. The tests are ignored by default; a Language smoke workflow installs pinned server versions and runs one language per job on changes to crates/, languages/ and fixtures/. Adds fixtures/java-app (Maven, JDK 21) for Java. * test(lsp): rename TypeScript from a usage and check Rust errors while typing Covers the fixes the smoke test turned up: a TypeScript rename started at a call site in another file renames the declaration (#1301), and rust-analyzer's own diagnostics and fixes arrive without saving (#1306).
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
package com.example.orders;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.condition.EnabledIfSystemProperty;
|
||||
|
||||
class OrderBookTest {
|
||||
@Test
|
||||
void sumsRevenueOverAllOrders() {
|
||||
OrderBook book = new OrderBook();
|
||||
book.place("alice", "Keyboard", 2, 1000);
|
||||
book.place("bob", "Mouse", 1, 500);
|
||||
assertEquals(2500, book.revenueCents());
|
||||
assertEquals(1, book.byCustomer("bob").size());
|
||||
}
|
||||
|
||||
@Test
|
||||
void rejectsEmptyOrders() {
|
||||
assertThrows(IllegalArgumentException.class, () -> new Order("alice", "Keyboard", 0, 1000));
|
||||
}
|
||||
|
||||
@Test
|
||||
@EnabledIfSystemProperty(named = "openidea.fail", matches = "true")
|
||||
void intentionallyFails() {
|
||||
assertEquals(1, new OrderBook().size(), "QA: an intentionally failing test");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user