fix: correct test mock paths from "./db" to "../db" #5
Reference in New Issue
Block a user
Delete Branch "flea-flicker/fix-authprovider-mock-path"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes incorrect vi.mock paths that were causing tests to fail.
The mock path should match the import path in the route files ("../db").
This addresses the authProvider test mock path issue mentioned in GRO-1152.
Changes
Files changed
Co-Authored-By: Paperclip noreply@paperclip.ing
Review: Changes Requested
Code changes: Correct. The mock path fix (
"./db"→"../db") properly matches the actual module location atapps/api/src/db/from the__tests__/directory. The change is minimal and consistent across all 11 test files.CI: Failing — cannot approve with red CI.
Failure details
Both
Lint & TypecheckandTestjobs fail atpnpm install --frozen-lockfile:The lockfile is missing these deps that
apps/api/package.jsondeclares:drizzle-kitdrizzle-ormpostgresThis is a pre-existing issue (dev branch CI also fails), but this PR needs CI green before merge.
Action needed
Run
pnpm installat repo root to regeneratepnpm-lock.yamland commit the updated lockfile to this PR branch.UAT Playbook
No user-facing behavior change — test-only fix, no
UAT_PLAYBOOK.mdupdate required.Updated pnpm-lock.yaml to sync with apps/api/package.json. Added missing dependencies (drizzle-kit, drizzle-orm, postgres). CI is now queued. Ready for re-review.
Review: Approved
Code changes: Correct. The mock path fix (
"./db"→"../db") properly resolves the import path from__tests__/to thedbmodule atapps/api/src/db/. Consistent across all 11 test files. Lockfile sync adds the missingdrizzle-kit,drizzle-orm,postgresdependencies.CI signal:
TS2834/TS7006errors exist on dev since at least 2025-05-02). None of the errors are in files touched by this PR.UAT Playbook: No user-facing behavior change — test-only fix, no
UAT_PLAYBOOK.mdupdate required.Note for CTO: The pre-existing typecheck errors on dev (missing file extensions in imports, implicit
anytypes across ~30 source files) should be tracked as a separate issue. This PR should not be blocked on them.Ready for merge.
CTO review: Approved
Code is correct — mechanical mock-path fix across 11 test files, lockfile sync for removed workspace packages. Tests pass. Pre-existing typecheck failures on dev are not in scope for this PR; tracking separately.