Skip to content

A desktop coding agent with free access to frontier models.

TypeScript
847 B
Raw Blame
import assert from "node:assert/strict";
import test from "node:test";
import type { Place } from "@omnirush/env";
import { selfHostServer } from "../src/self-host.ts";

test("selfHostServer skips Daytona placement", async () => {
  const place: Place = {
    kind: "daytona",
    host() {
      throw new Error("host must not be called");
    },
    async db() {
      throw new Error("db must not be called");
    },
    async exposeMock() {
      throw new Error("exposeMock must not be called");
    },
    denBase() {
      throw new Error("denBase must not be called");
    },
  };

  await assert.rejects(
    selfHostServer({ place, name: "Test", slug: "test", ownerEmails: ["[email protected]"] }),
    (error: unknown) => error instanceof Error && error.name === "SkipError" && error.message.includes("OMNIRUSH_EVAL_DAYTONA"),
  );
});