You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ci: add automated test job once test infra exists #125
Neither web nor server has automated tests, and CI runs no test step. The only test-like code today is the manual scripts server/src/test-tracking.js and server/src/test-volumes.js, which are not part of any automated suite.
This is the third gap in our CI/CD coverage (alongside web lint and the missing server pipeline).
Proposed change
Pick and set up a test runner (e.g. vitest) in web and server.
Add test scripts to both package.json files.
Port the manual server/src/test-*.js scripts into real, runnable tests.
Seed an initial set of unit tests for pure functions that are easy to cover, e.g.:
Add a test step to each job in .github/workflows/ci.yml.
Acceptance criteria
Test runner configured in both packages
test script available in web and server
Manual test-*.js scripts replaced by automated tests
CI runs tests on every PR and on push to main
Notes
This depends on (or pairs well with) the web-lint and server-CI issues. The test step can be added to the existing/added jobs rather than as a separate workflow.
@gkhngyk I’d like to work on this issue. I’ve already completed #195 and will be picking up #196 and #198 next as part of the web-related work and server part. Does that sound good to you?
Hi @Pallavikumarimdb 👋 Thanks again for #195 — great work landing the web test infrastructure.
The web side is now in good shape: #195 (Vitest infra) and #196 (csv.ts tests) are merged, and CI already runs yarn test on the web job. That leaves the server-side part of this umbrella still open:
server/ test runner + test script
Port server/src/test-tracking.js / test-volumes.js into real automated tests
Seed server unit tests (e.g. response-parser.js, cloro-scraper.js response parsing)
Add the test step to the server CI job
Are you still planning to pick up the server part? No pressure at all — just checking so we know whether to keep it reserved for you or reopen it for other contributors. If you'd like to take it, feel free to go ahead and open a PR whenever you're ready 🙌
Hi @Pallavikumarimdb 👋 Thanks again for #195 — great work landing the web test infrastructure.
The web side is now in good shape: #195 (Vitest infra) and #196 (csv.ts tests) are merged, and CI already runs yarn test on the web job. That leaves the server-side part of this umbrella still open:
* [ ] `server/` test runner + `test` script[ ] Port `server/src/test-tracking.js` / `test-volumes.js` into real automated tests[ ] Seed server unit tests (e.g. `response-parser.js`, `cloro-scraper.js` response parsing)[ ] Add the test step to the **server** CI job
Are you still planning to pick up the server part? No pressure at all — just checking so we know whether to keep it reserved for you or reopen it for other contributors. If you'd like to take it, feel free to go ahead and open a PR whenever you're ready 🙌
Heyy @gkhngyk Yeah, I would love to pick up the server part and open the PR.
Awesome, thanks @Pallavikumarimdb! 🙌 The server part is yours — assigning you now. Take your time, and feel free to split it into more than one PR if that's easier (e.g. runner + CI step first, then the ported tests). Ping here if you hit any questions.
Activity
gkhngyk commentedon Jun 8, 2026
Decomposed into granular issues
To make this epic actionable for contributors, the web-side work has been split into smaller, self-contained issues:
web/(runner +testscript +@/alias + smoke test + CI step)web/src/lib/csv.ts(blocked by chore(test): set up Vitest test infrastructure for web/ #195)web/src/lib/citations/classify.ts+ hostname helpers (blocked by chore(test): set up Vitest test infrastructure for web/ #195)Mapping to the checklist above:
testscript + CI step) → chore(test): set up Vitest test infrastructure for web/ #195csv.ts,classify.ts) → test(csv): add unit tests for toCsv escaping (comma, quote, newline) #196, test(citations): unit tests for classifyDomain and hostname helpers #198What this issue still tracks
This stays open as the umbrella, now scoped to the parts not yet split out:
testscriptserver/src/test-tracking.js/test-volumes.jsinto real automated testsresponse-parser.js,cloro-scraper.jsresponse parsing)article-type.tsweb unit tests (not yet split out)Contributors: please pick up #195 first (it unblocks the web test issues), and use this issue for the remaining server-side test work.
Pallavikumarimdb commentedon Jun 9, 2026
@gkhngyk I’d like to work on this issue. I’ve already completed #195 and will be picking up #196 and #198 next as part of the web-related work and server part. Does that sound good to you?
gkhngyk commentedon Jun 11, 2026
Hi @Pallavikumarimdb 👋 Thanks again for #195 — great work landing the web test infrastructure.
The web side is now in good shape: #195 (Vitest infra) and #196 (csv.ts tests) are merged, and CI already runs
yarn teston the web job. That leaves the server-side part of this umbrella still open:server/test runner +testscriptserver/src/test-tracking.js/test-volumes.jsinto real automated testsresponse-parser.js,cloro-scraper.jsresponse parsing)Are you still planning to pick up the server part? No pressure at all — just checking so we know whether to keep it reserved for you or reopen it for other contributors. If you'd like to take it, feel free to go ahead and open a PR whenever you're ready 🙌
Pallavikumarimdb commentedon Jun 11, 2026
Heyy @gkhngyk Yeah, I would love to pick up the server part and open the PR.
gkhngyk commentedon Jun 11, 2026
Awesome, thanks @Pallavikumarimdb! 🙌 The server part is yours — assigning you now. Take your time, and feel free to split it into more than one PR if that's easier (e.g. runner + CI step first, then the ported tests). Ping here if you hit any questions.
test(server): complete Vitest coverage for issue ansvisor#125 - remov…
test(server): Resolves the remaining server-side gaps from #125. (#256)