fix(apps): recover stale npm installs

This commit is contained in:
Xubin Ren
2026-05-29 17:26:58 +08:00
parent d7bc1bcfb5
commit 57563b671f
4 changed files with 166 additions and 1 deletions
+16
View File
@@ -134,6 +134,22 @@ describe("webui API helpers", () => {
});
});
it("surfaces API error response bodies", async () => {
vi.stubGlobal(
"fetch",
vi.fn().mockResolvedValue({
ok: false,
status: 500,
text: async () => "npm error ENOTEMPTY",
}),
);
await expect(runCliAppAction("tok", "install", "hyperframes")).rejects.toMatchObject({
status: 500,
message: "npm error ENOTEMPTY",
});
});
it("serializes provider settings updates without returning secrets", async () => {
await updateProviderSettings("tok", {
provider: "openrouter",