style: formatted evaluator test additions

This commit is contained in:
can1357
2026-07-14 23:11:49 +02:00
parent f2b70eeede
commit 984a97fa51
3 changed files with 12 additions and 6 deletions
+5 -1
View File
@@ -431,7 +431,11 @@ class DaemonBroker {
if (spec.detached && spec.pty) {
throw new Error("A detached daemon cannot allocate a PTY");
}
if (spec.pty && process.platform === "win32" && [".bat", ".cmd"].includes(path.extname(spec.application).toLowerCase())) {
if (
spec.pty &&
process.platform === "win32" &&
[".bat", ".cmd"].includes(path.extname(spec.application).toLowerCase())
) {
throw new Error('Windows batch files require application "cmd.exe" with the batch path after "/c"');
}
const existing = this.#records.get(spec.name);
@@ -46,9 +46,9 @@ describe("model switch from vision to text-only", () => {
await session.prompt("now text only");
const messages = text.calls.at(-1)?.context.messages ?? [];
expect(messages.flatMap(message => (Array.isArray(message.content) ? message.content : []))).not.toContainEqual(
expect.objectContaining({ type: "image" }),
);
expect(
messages.flatMap(message => (Array.isArray(message.content) ? message.content : [])),
).not.toContainEqual(expect.objectContaining({ type: "image" }));
} finally {
await session.dispose();
}
+4 -2
View File
@@ -1,5 +1,5 @@
import { describe, expect, it, spyOn } from "bun:test";
import { Args, Command, type CommandEntry, Flags, run } from "../src/cli"
import { Args, Command, type CommandEntry, Flags, run } from "../src/cli";
class GoodCommand extends Command {
static description = "prints good things";
@@ -106,7 +106,9 @@ describe("run() usage errors", () => {
});
const prevExitCode = process.exitCode;
try {
await expect(run({ bin: "omp", version: "0.0.0", argv: ["bench", "--unknown"], commands })).resolves.toBeUndefined();
await expect(
run({ bin: "omp", version: "0.0.0", argv: ["bench", "--unknown"], commands }),
).resolves.toBeUndefined();
} finally {
stderrSpy.mockRestore();
process.exitCode = prevExitCode ?? 0;