about summary refs log tree commit diff
path: root/editors/code/src
diff options
context:
space:
mode:
authorhkalbasi <hamidrezakalbasi@protonmail.com>2024-03-15 16:28:59 +0330
committerhkalbasi <hamidrezakalbasi@protonmail.com>2024-03-15 16:28:59 +0330
commiteeff20d1727fd7de174b72ff150fd23afcc66d93 (patch)
tree729db848c1c25b635f7656b07fcb19dab8bdb187 /editors/code/src
parent9029c51ae4d2517baf7a3eb0f70f9284af6afe3d (diff)
Show compilation progress in test explorer
Diffstat (limited to 'editors/code/src')
-rw-r--r--editors/code/src/lsp_ext.ts3
-rw-r--r--editors/code/src/test_explorer.ts6
2 files changed, 9 insertions, 0 deletions
diff --git a/editors/code/src/lsp_ext.ts b/editors/code/src/lsp_ext.ts
index 31ac3d9413e..ca8106371b0 100644
--- a/editors/code/src/lsp_ext.ts
+++ b/editors/code/src/lsp_ext.ts
@@ -100,6 +100,9 @@ export const discoveredTests = new lc.NotificationType<DiscoverTestResults>(
 export const runTest = new lc.RequestType<RunTestParams, void, void>("experimental/runTest");
 export const abortRunTest = new lc.NotificationType0("experimental/abortRunTest");
 export const endRunTest = new lc.NotificationType0("experimental/endRunTest");
+export const appendOutputToRunTest = new lc.NotificationType<string>(
+    "experimental/appendOutputToRunTest",
+);
 export const changeTestState = new lc.NotificationType<ChangeTestStateParams>(
     "experimental/changeTestState",
 );
diff --git a/editors/code/src/test_explorer.ts b/editors/code/src/test_explorer.ts
index 2f0b4d5b5cf..ac4ffb19263 100644
--- a/editors/code/src/test_explorer.ts
+++ b/editors/code/src/test_explorer.ts
@@ -142,6 +142,12 @@ export const prepareTestExplorer = (
     );
 
     ctx.pushClientCleanup(
+        client.onNotification(ra.appendOutputToRunTest, (output) => {
+            currentTestRun!.appendOutput(`${output}\r\n`);
+        }),
+    );
+
+    ctx.pushClientCleanup(
         client.onNotification(ra.changeTestState, (results) => {
             const test = idToTestMap.get(results.testId)!;
             if (results.state.tag === "failed") {