test : added unit tests for dateUtils.ts functions#784
Conversation
|
@TESTPERSONAL is attempting to deploy a commit to the PRIYANSHU DOSHI's projects Team on Vercel. A member of the Team first needs to authorize it. |
GSSoC Label Checklist 🏷️@Priyanshu-byte-coder — please apply the appropriate labels before merging: Difficulty (pick one):
Quality (optional):
Validation (required to score):
|
Priyanshu-byte-coder
left a comment
There was a problem hiding this comment.
Import pattern is correct — function imported from source. Three infrastructure issues to fix before merge:
- Missing
"test": "vitest run"inpackage.jsonscripts — tests can't run in CI without this. vitest.config.tsmissingresolve.alias—@/lib/*path aliases fail without:
import path from 'path'
export default defineConfig({
resolve: { alias: { '@': path.resolve(__dirname, 'src') } },
test: { globals: true }
})- Missing EOF newline on test file.
4710bea to
0474072
Compare
|
This pull request is fully up-to-date with the latest upstream merges, all review items are addressed, local tests are passing cleanly, and it is fully ready to be merged! 🚀 |
|
Merge conflict: |
|
This PR has merge conflicts with |
|
Hi! This branch has been rebased and is ready to merge. |
Closes #764.
Summary of What Has Been Done:
Added test/dateUtils.test.ts with comprehensive vitest unit tests covering all exported functions in src/lib/dateUtils.ts.
Changes Made:
New file: test/dateUtils.test.ts
Test coverage (10 tests):
Uses vi.useFakeTimers() and vi.setSystemTime() for deterministic time-dependent testing.
Impact it Made:
All 10 tests pass. Week-boundary calculations are now validated across month transitions.