ci(web): gate vitest in CI + fix stale frontend test mocks; drop stray lib/ gitignore rule#103
Merged
Merged
Conversation
…cks; drop stray lib/ gitignore rule - Add a blocking 'Run tests' (pnpm test = vitest run) step to the Frontend Build job — the frontend suite was never run in CI, so ~5 stale-mock failures went unnoticed. - Fix them: api.test.ts fetch mocks now provide .text() (request() reads response.text()); notification-store.test.ts mocks api.post and matches the store's /me/notifications/* paths. - Remove '.gitignore' lib/ and lib64/ (Python-template leftovers) that were ignoring apps/web/lib/.
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.
What & why
The frontend
vitestsuite was never run in CI (onlytsc+next build), so ~5 stale-mock failures sat red unnoticed. This gates the suite, fixes the failures, and removes a.gitignorerule that was silently ignoringapps/web/lib/.Changes
CI gate — add a blocking
Run testsstep (pnpm test=vitest run) to the Frontend Build job.Fix pre-existing failures (source evolved, mocks didn't):
lib/__tests__/api.test.ts—request()readsresponse.text(); mocks only had.json(). Added.text()to the 3 success mocks.stores/__tests__/notification-store.test.ts— store callsapi.post('/me/notifications/…'); test mockedapi.patchon old/notifications/…paths. Mockpost+ match the store.gitignore — remove
lib//lib64/(Python-template leftovers) that matchedapps/web/lib/.Verification
vitest run: 13 files, 113 tests pass (5 were failing).git check-ignore apps/web/lib/*now returns nothing; CI YAML validated.No CHANGELOG entry — internal CI/test tooling, not user-facing.
Merge order
Independent of the storage-cap stack (#98–#102) — recommend merging this first, then rebasing the stack onto the new
mainso its branches inherit the vitest gate + fixes.