Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions agent-computer/tests/shell.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ describe("the command that actually runs", () => {
);

const result = await createShell(root, source()).run({
// biome-ignore lint/suspicious/noTemplateCurlyInString: the literal `${...}` is the fixture — this asserts on unexpanded placeholder text, so a real template would break the test.
command: 'echo "[${MARKER:-clean}]"',
});

Expand Down
14 changes: 13 additions & 1 deletion biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,17 @@
"parser": {
"tailwindDirectives": true
}
}
},
"overrides": [
{
"includes": ["**/tests/**", "**/*.test.ts", "**/*.test.tsx"],
"linter": {
"rules": {
"style": {
"noNonNullAssertion": "off"
}
}
}
}
]
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"generate:app-config": "bun --env-file=.env scripts/generate-app-config.ts",
"format": "bunx biome format --write .",
"format:check": "bunx biome format .",
"lint": "bunx biome lint .",
"lint": "bunx biome lint --error-on-warnings .",
"test": "bun test",
"typecheck": "bun run --filter '*' typecheck",
"test:ci": "bun scripts/test-ci.ts",
Expand Down
4 changes: 2 additions & 2 deletions server/tests/skill-ownership.integration.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { afterAll, beforeAll, describe, expect, test } from "bun:test";
import { randomUUID } from "node:crypto";
import { eq, inArray } from "drizzle-orm";
import { inArray } from "drizzle-orm";
import { createAuditStore } from "../src/audit";
import type { ActionPolicy } from "../src/computer/policy";
import { createDatabase } from "../src/db/client";
Expand All @@ -24,7 +24,7 @@ const database = createDatabase(
TEST_POOL,
);

let policy: ActionPolicy = { mode: "enforce", deny: [], allow: ["true"] };
const policy: ActionPolicy = { mode: "enforce", deny: [], allow: ["true"] };

const store = createPluginStore({
database,
Expand Down
6 changes: 6 additions & 0 deletions server/tests/tenant-package.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -606,6 +606,7 @@ describe("expanding a package file against the environment", () => {

test("takes the value from the environment", () => {
expect(
// biome-ignore lint/suspicious/noTemplateCurlyInString: the literal `${...}` is the fixture — this asserts on unexpanded placeholder text, so a real template would break the test.
expandEnvironment("endpoint: ${AG_UI_URL}", file, {
AG_UI_URL: "https://bots.example.test/ag-ui",
}),
Expand All @@ -615,6 +616,7 @@ describe("expanding a package file against the environment", () => {
test("falls back to the default when the name is not set", () => {
expect(
expandEnvironment(
// biome-ignore lint/suspicious/noTemplateCurlyInString: the literal `${...}` is the fixture — this asserts on unexpanded placeholder text, so a real template would break the test.
"endpoint: ${AG_UI_URL:-http://localhost:4200}",
file,
{},
Expand All @@ -624,6 +626,7 @@ describe("expanding a package file against the environment", () => {

test("prefers the environment over the default", () => {
expect(
// biome-ignore lint/suspicious/noTemplateCurlyInString: the literal `${...}` is the fixture — this asserts on unexpanded placeholder text, so a real template would break the test.
expandEnvironment("endpoint: ${AG_UI_URL:-http://localhost:4200}", file, {
AG_UI_URL: "https://bots.example.test",
}),
Expand All @@ -632,19 +635,22 @@ describe("expanding a package file against the environment", () => {

test("treats an empty value as unset", () => {
expect(
// biome-ignore lint/suspicious/noTemplateCurlyInString: the literal `${...}` is the fixture — this asserts on unexpanded placeholder text, so a real template would break the test.
expandEnvironment("endpoint: ${AG_UI_URL:-http://localhost:4200}", file, {
AG_UI_URL: "",
}),
).toBe("endpoint: http://localhost:4200");
});

test("an empty default is allowed and is not an error", () => {
// biome-ignore lint/suspicious/noTemplateCurlyInString: the literal `${...}` is the fixture — this asserts on unexpanded placeholder text, so a real template would break the test.
expect(expandEnvironment("suffix: ${NOTHING:-}", file, {})).toBe(
"suffix: ",
);
});

test("refuses a name with neither a value nor a default", () => {
// biome-ignore lint/suspicious/noTemplateCurlyInString: the literal `${...}` is the fixture — this asserts on unexpanded placeholder text, so a real template would break the test.
expect(() => expandEnvironment("endpoint: ${AG_UI_URL}", file, {})).toThrow(
/agents\.yaml refers to \$\{AG_UI_URL\}/,
);
Expand Down
1 change: 1 addition & 0 deletions tests/compose.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ test("provides PostgreSQL with pgvector for local development", () => {

expect(compose).toContain("postgres:");
expect(compose).toContain("pgvector/pgvector:");
// biome-ignore lint/suspicious/noTemplateCurlyInString: the literal `${...}` is the fixture — this asserts on unexpanded placeholder text, so a real template would break the test.
expect(compose).toContain("${POSTGRES_PORT:-5432}:5432");
});

Expand Down