From 8dc0651430c5bb4727131fb3e0a6f18b26060e72 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Sun, 22 Nov 2026 09:18:38 +0000 Subject: [PATCH] Run e2e scripts with nub The nub runner executes these TypeScript and JavaScript files directly. The documented commands match the validate workflow, which already calls nub scripts/e2e/ai-report.mjs. Co-authored-by: Jonathan Beckman --- docs/database.md | 2 +- docs/e2e.md | 10 +++++----- e2e.config.ts | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/database.md b/docs/database.md index 56e31e5..51e3583 100644 --- a/docs/database.md +++ b/docs/database.md @@ -26,7 +26,7 @@ The Worker binding is also `DATABASE`. ## D1 default -`bun alchemy deploy` / `nub run infra:deploy:*` with no `DATABASE` value and no PlanetScale tokens +`nub run infra:deploy:*` with no `DATABASE` value and no PlanetScale tokens stays on D1. - Binding: `DB` diff --git a/docs/e2e.md b/docs/e2e.md index c2becbe..f86bba6 100644 --- a/docs/e2e.md +++ b/docs/e2e.md @@ -189,8 +189,8 @@ evidence of recorded-action replay. ## AI usage accounting -For a local accounting report, run `nub exec tsx scripts/e2e/ai-report.mjs init` before -the tests and `nub exec tsx scripts/e2e/ai-report.mjs summarize` afterward. These commands +For a local accounting report, run `nub scripts/e2e/ai-report.mjs init` before +the tests and `nub scripts/e2e/ai-report.mjs summarize` afterward. These commands use the pinned Node runtime and do not make model calls. The summary counts the suite's own decision-model calls. Executor token counts and cost come from @@ -461,10 +461,10 @@ do not exercise the Items API or prove indexing. The isolated live suite is `tests/ai-search.external.e2e.ts`. Launch it with: ```sh -E2E_ENV_FILE=/path/to/isolated-test-account.env nub exec tsx scripts/e2e/ai-search.ts +E2E_ENV_FILE=/path/to/isolated-test-account.env nub scripts/e2e/ai-search.ts # Refresh and then verify the changed browser actions against fresh owned resources. -E2E_ENV_FILE=/path/to/isolated-test-account.env nub exec tsx scripts/e2e/ai-search.ts --record --grep administrators -E2E_ENV_FILE=/path/to/isolated-test-account.env nub exec tsx scripts/e2e/ai-search.ts --strict-cache --grep administrators +E2E_ENV_FILE=/path/to/isolated-test-account.env nub scripts/e2e/ai-search.ts --record --grep administrators +E2E_ENV_FILE=/path/to/isolated-test-account.env nub scripts/e2e/ai-search.ts --strict-cache --grep administrators ``` The private file must supply `CLOUDFLARE_ACCOUNT_ID`, `CLOUDFLARE_API_TOKEN`, and diff --git a/e2e.config.ts b/e2e.config.ts index abac86e..94af37e 100644 --- a/e2e.config.ts +++ b/e2e.config.ts @@ -58,7 +58,7 @@ export default { environment: "test", command: { executable: "nub", - args: ["exec", "tsx", "scripts/e2e/dev.ts"], + args: ["scripts/e2e/dev.ts"], env: appEnvironment, startupTimeout: process.env.E2E_CONTAINER_RUNTIME === "1" ? 600_000 : 180_000, shutdownTimeout: 120_000,