Skip to content

Commit 6d70bc8

Browse files
test: document summary should work
1 parent be1bf80 commit 6d70bc8

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

editors/vscode/src/features/tool.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ export async function editorToolAt(
339339
}
340340

341341
dispose();
342-
return;
342+
throw new Error("No document metrics or server info");
343343
}
344344

345345
html = html.replace(":[[preview:FontsExportConfigure]]:", base64Encode(fontsExportConfig));

editors/vscode/src/test/e2e/simple-docs.test.ts

+9
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,15 @@ export async function getTests(ctx: Context) {
6767
await vscode.commands.executeCommand("workbench.action.closeActiveEditor");
6868
});
6969

70+
suite.addTest("diagnostics works well", async () => {
71+
await ctx.openDocument(vscode.Uri.joinPath(workspaceUri, "preview-skyzh-cv.typ"));
72+
73+
await vscode.commands.executeCommand("tinymist.showSummary");
74+
75+
// close the editor
76+
await vscode.commands.executeCommand("workbench.action.closeActiveEditor");
77+
});
78+
7079
suite.addTest("diagnostics works well", async () => {
7180
const mainUrl = vscode.Uri.joinPath(workspaceUri, "diagnostics.typ");
7281

0 commit comments

Comments
 (0)