CI/CD error

Error: connect ECONNREFUSED 127.0.0.1:3000

The test tried to hit a local server that isn't actually up yet in the CI environment, a classic 'works on my machine' parity gap.

Why this happens

How to fix it

  1. Use a start-and-wait tool (e.g. `start-server-and-test`, or a `webServer`/health-check option in your test runner's config) instead of a fixed sleep
  2. Read the target URL from an environment variable instead of hardcoding `localhost:3000`, so CI and local can differ safely