Skip to content

Latest commit

 

History

History
57 lines (44 loc) · 1.44 KB

File metadata and controls

57 lines (44 loc) · 1.44 KB

Testing

Default Verify Path

Run the full contributor check with:

yarn verify

That script will:

  1. install dependencies when node_modules is missing
  2. start the local PostgreSQL container
  3. run yarn lint
  4. run yarn test
  5. run yarn build
  6. shut the local PostgreSQL container down on exit

Running Test Buckets Directly

yarn lint
yarn test
yarn test:unit
yarn test:integration
yarn test:smoke
yarn test:external
yarn build

What Each Test Bucket Covers

  • test:unit: repository and helper logic that does not need a live HTTP server
  • test:integration: PostgreSQL-backed query and datasource behavior
  • test:smoke: basic HTTP server boot and GET /healthz
  • test:external: live upstream dependency checks that are intentionally excluded from the default contributor path

Manual Local API Check

  1. Copy .env.example to .env
  2. Run yarn dev:up
  3. Start the API with yarn start:dev
  4. Call http://localhost:6060/healthz
  5. Point the frontend at http://localhost:6060

Troubleshooting

  • if integration tests fail immediately, make sure Docker is running
  • if PostgreSQL is already bound on port 5432, stop the conflicting service or adjust the compose file and env values together
  • keep ENABLE_SCHEDULED_JOBS=false for local development unless you are actively testing the scheduled import jobs
  • use yarn test:external only when you want to validate live upstream dependencies