Run Tests
run_testsRun the project's Jasmine spec files (helpers/.spec.tsx) headlessly on the project VM (jsdom — no browser needed). Frontend AND backend code is testable: specs may render components (@testing-library/react) or import endpoint handlers/backend helpers and call them directly. Limits: fetch throws inside tests (mock with spyOn(globalThis, "fetch")), process.env secrets are absent (give a module that reads one at load a dummy value from a helper the spec imports BEFORE it, e.g. helpers/testEnv.tsx setting process.env.JWT_SECRET = "test-secret"; env is reset per spec file), spyOn cannot replace an exported function of a project module (pass dependencies in as arguments instead), no top-level await in specs, and @floot/ services (email, storage, ai, queueTask, …) never run: each function is a Jasmine spy that throws until the spec gives it a result on the imported function itself, e.g. (sendEmail as jasmine.Spy).and.resolveTo({ ok: true, messageId: "m1" }); spies reset before every spec. Returns per-file PASS/FAIL with failing expectations. Defaults to all spec files except hook specs (file name contains "use" — those need real React scheduling and are excluded, matching the in-editor checker); pass paths to run specific spec files, including hook specs.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| paths | No | ||
| projectId | Yes |