Fix #41 test env wiring, add PR CI gates, and clean lint/type issues - #52
Merged
Vara-dev merged 1 commit intoSep 5, 2026
Conversation
…/type issues Summary: - Set deterministic Jest test env wiring by populating both MONGO_URI and MONGO_DB_NAME during global setup. - Add a reusable typecheck script for local and CI parity. - Add PR CI workflow that runs lint, typecheck, and tests with coverage so pull requests fail on quality regressions. - Add Jest global coverage thresholds to enforce a baseline in automated checks. - Apply manual lint/type safety fixes across Cypress/e2e utility and test env files (remove unused params, replace explicit any with safer types). - Align spec tests and string utility files with lint rules (quote style and ESM jest import consistency). Details: - testEnv/setup.ts: set process.env.MONGO_DB_NAME = dbConfig.Database and use typed global instance access. - package.json: add "typecheck": "tsc --noEmit --project tsconfig.json". - .github/workflows/pr-ci.yml: new pull_request workflow on main with npm ci + lint + typecheck + test --coverage. - jest.config.ts: add coverageThreshold.global floors for branches/functions/lines/statements. - cypress.config.ts: remove unused setupNodeEvents params. - scripts/start-e2e-server.ts, testEnv/teardown.ts, BaseError.ts: strengthen types and remove explicit any. - meetings.controller.spec.ts and string utils files: lint-safe string quoting and jest import cleanup. Validation: - User confirmed in WSL: lint passes (warning only), typecheck passes, and tests pass with coverage (17/17 suites, 93/93 tests). Notes: - Branch protection could not be applied from this account due READ-level repo permission; PR CI workflow is included so admins can require its check on main.
tim-rohrer
approved these changes
Aug 27, 2026
tim-rohrer
left a comment
Collaborator
There was a problem hiding this comment.
@Vara-dev, I really appreciate your work on this, and in cleaning up some code I'd left dirty.
I'm approving, with the understanding that you mentioned potentially adding check for OpenSpec. Maybe that is another PR after we get a little more comfortable with the new tool?
| ) | ||
| const scheduledCount = await db.collection("scheduled-meetings").countDocuments() | ||
| const unscheduledCount = await db.collection("unscheduled-meetings").countDocuments() | ||
| console.log(` ✅ Verified: ${scheduledCount} scheduled, ${unscheduledCount} unscheduled meetings`) |
Collaborator
There was a problem hiding this comment.
I wonder if we're going to have some competing styling rules.
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.
Summary:
Details:
Validation: