feat(api): Add health check endpoint, fix tests, enforce npm#949
Merged
Conversation
- Add GET /api/health endpoint with DB connectivity check, env var validation, and structured status response (healthy/degraded/unhealthy) - Add unit tests for health endpoint with 100% coverage - Fix media.tests.tsx import path and mdx-pages mock - Fix projects.tests.tsx type annotations and VWCContributor mock fields - Fix getStaticProps error test to match graceful-degradation behavior - Exclude src/ from Jest test path to prevent API routes running as tests - Enforce npm via only-allow preinstall script, remove yarn.lock - Replace yarn references in scripts with npm run
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
- Add jest.yml workflow to run unit tests on push/PR to master - Migrate playwright.yml from yarn to npm (npm ci, npm run, npx) - Update cache keys from yarn.lock to package-lock.json - Update setup-node action to v4 - Target master branch only in both workflows
- Replace Jest with Vitest v4 + happy-dom environment - Add vitest.config.mts with path aliases, React plugin, PostCSS bypass - Update all test files: jest.mock → vi.mock, jest.fn → vi.fn, jest.spyOn → vi.spyOn - Use vitest-dom for proper matcher type declarations - Switch dynamic imports from require() to await import() for Vite alias resolution - Rename CI workflow jest.yml → vitest.yml - Remove jest, ts-jest, jest-environment-jsdom, @types/jest - Add vitest, @vitest/coverage-v8, happy-dom, @vitejs/plugin-react, vitest-dom All 116 tests pass across 9 test files in ~800ms
e93c2de to
71909d9
Compare
- Restore import/no-unresolved, import/extensions, react/function-component-definition, and jsx-a11y/label-has-associated-control back to error severity - Add vitest.config.mts to ESLint test override files array - Fix indentation on vitest.config.mts exclude property - Remove redundant inline eslint-disable comment
9 tasks
- react/function-component-definition and jsx-a11y/label-has-associated-control fail across dozens of existing files, blocking the build - Keep import/no-unresolved and import/extensions as error
jeromehardaway
approved these changes
Feb 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
✅ All 116 tests pass across 9 test files in ~800ms