Coexists with Mocha (kept for unit-style tests) and Cypress (unchanged, web e2e). Adds: - apps/api/features/*.feature — Gherkin scenarios - apps/api/features/step-definitions/*.steps.ts — step implementations - apps/api/features/support/world.ts — per-scenario World, spins up the Express app in-process via createApp() + supertest (no real server needed, same approach as the existing Mocha health test) - apps/api/cucumber.cjs — config, deliberately .cjs (not .js) to avoid the same ESM/CJS config-loading mismatch that broke apps/web/cypress.config.ts earlier - `test:bdd` script (cross-env + tsx via NODE_OPTIONS=--import=tsx, for cross-platform ESM+TS loading) - health.feature/steps as a working example, mirroring the existing Mocha health test so both suites cover the same behavior in their respective styles CI: runs `pnpm --filter api test:bdd` alongside the existing test step. README: documents the new test layer and the TS/ESM config-loading caveat for future tool configs. Verified locally: lint, mocha, cucumber, and full build all pass.
12 lines
337 B
Gherkin
12 lines
337 B
Gherkin
Feature: API health check
|
|
As a monitoring service
|
|
I want to query the API
|
|
So that I can verify it is up and responding correctly
|
|
|
|
Scenario: The API is available
|
|
When I send a GET request to "/health"
|
|
Then the response status should be 200
|
|
And the response body should be:
|
|
"""
|
|
{ "status": "ok" }
|
|
"""
|