Skip to content

chore: finalize standards compliance - #27

Merged
vreshch merged 2 commits into
masterfrom
chore/finalize-standards
Mar 2, 2026
Merged

chore: finalize standards compliance#27
vreshch merged 2 commits into
masterfrom
chore/finalize-standards

Conversation

@vreshch

@vreshch vreshch commented Mar 2, 2026

Copy link
Copy Markdown
Owner

Summary

  • Fix TypeScript version pinning: changed "typescript": "5.9.3" to "^5.9.3" (caret range per standards)
  • Add Vitest unit test infrastructure: configured Vitest with React Testing Library, jsdom environment, and @testing-library/jest-dom matchers
  • Extract testable modules: moved navigation items, site metadata, redirect config, and cn() utility into dedicated src/lib/ files for better testability and separation of concerns
  • 31 unit tests across 4 test files: covering cn() utility, navigation constants, redirect rules, and Sidebar component rendering
  • Update test scripts: npm test now runs Vitest unit tests; Playwright e2e tests moved to npm run test:e2e

Standards addressed

Gap Status
TypeScript pinned 5.9.3 instead of ^5.9.3 Fixed
No unit tests (only Playwright e2e) Fixed — 31 unit tests added
Default exports in App Router pages/layouts Acceptable (Next.js convention)

Test plan

  • npm test (vitest) — 31 tests pass
  • npm run build — Next.js build succeeds
  • npm run lint — no warnings or errors
  • npm run test:e2e — Playwright e2e tests (requires dev server)

vreshch added 2 commits March 2, 2026 22:54
Change typescript from pinned "5.9.3" to "^5.9.3" to allow
compatible patch/minor updates per standards compliance.
- Set up Vitest with React Testing Library and jsdom environment
- Extract cn() utility (clsx + tailwind-merge) to src/lib/cn.ts
- Extract navItems and siteMetadata constants to src/lib/constants.ts
- Extract redirect config to src/lib/redirects.ts for testability
- Add 31 unit tests across 4 test files:
  - cn.test.ts: class merging, tailwind conflict resolution
  - constants.test.ts: navigation items and metadata validation
  - redirects.test.ts: legacy URL mapping and redirect rules
  - sidebar.test.tsx: component rendering and active state
- Update test scripts: "test" runs vitest, e2e moved to "test:e2e"
@github-actions

github-actions Bot commented Mar 2, 2026

Copy link
Copy Markdown

🎉 PR Validation ✅ PASSED

Commit: f259eab03485cd9ac5cc1849e3b8c957572fc2c8
Branch: chore/finalize-standards

Checks:

  • ✅ Dependencies installed
  • ✅ Linting passed
  • ✅ Build successful
  • ✅ Docker image validated

Ready to merge!


🔗 View workflow run
⏰ Generated at: 2026-03-02T21:57:08.469Z

@vreshch
vreshch merged commit bc5212a into master Mar 2, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant