test: verify install and runtime messages

This commit is contained in:
Shakker
2026-05-11 17:16:15 +01:00
parent b3a9eba793
commit 8f79e34cbe
8 changed files with 31 additions and 15 deletions

View File

@@ -258,9 +258,7 @@ describe("model override pipeline wiring", () => {
await expect(resultPromise).resolves.toEqual({ prependContext: "fast" });
expect(logger.error).toHaveBeenCalledWith(
expect.stringContaining(
"[hooks] before_prompt_build handler from slow-plugin failed: timed out after 5ms",
),
"[hooks] before_prompt_build handler from slow-plugin failed: timed out after 5ms",
);
} finally {
vi.useRealTimers();

View File

@@ -378,7 +378,11 @@ describe("ensureApiKeyFromEnvOrPrompt", () => {
expect(result).toBe("env-key");
expectMinimaxEnvRefCredentialStored(setCredential);
expect(note).toHaveBeenCalledWith(
expect.stringContaining("Could not validate provider reference"),
[
"Could not validate provider reference filemain:/providers/minimax/apiKey.",
"secrets.providers.filemain.path is not readable: /tmp/does-not-exist-secrets.json | ENOENT: no such file or directory, lstat '/tmp/does-not-exist-secrets.json' | secrets.providers.filemain.path is not readable: /tmp/does-not-exist-secrets.json | ENOENT: no such file or directory, lstat '/tmp/does-not-exist-secrets.json'",
"Check your provider configuration and try again.",
].join("\n"),
"Reference check failed",
);
});