style: formatted evaluator test additions
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user