fix: make test suite runnable without DB/Chrome, add tests to CI
All checks were successful
Build & Deploy to Staging / Build & Deploy to Staging (push) Successful in 12m28s
All checks were successful
Build & Deploy to Staging / Build & Deploy to Staging (push) Successful in 12m28s
- Refactor index.ts to skip start() when NODE_ENV=test - Add test setup with mocks for db, keys, browser, verification, email, usage - Add vitest.config.ts with setup file - Rewrite tests to work with mocks (42 tests, all passing) - Add new tests: signup 410, recovery validation, CORS headers, error format, API root - Add test step to CI pipeline before Docker build
This commit is contained in:
parent
bc698b66b2
commit
b95994cc3c
6 changed files with 327 additions and 156 deletions
|
|
@ -13,6 +13,19 @@ jobs:
|
|||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '22'
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Run tests
|
||||
run: npm test
|
||||
env:
|
||||
NODE_ENV: test
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue