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
Problem:tests/issues-144-145-146-152.test.ts imports connectDB and disconnectDB from '../src/infra/db/mongoose.js', but this path does not exist. The actual database connection module is at src/infra/mongo/connection.ts and exports connectMongo and disconnectMongo. The entire test suite fails to load.
Implementation: Change the import to import { connectMongo, disconnectMongo } from '../src/infra/mongo/connection.js' and update all references from connectDB()/disconnectDB() to connectMongo()/disconnectMongo().
Dependencies:
Depends on None
Acceptance Criteria:
The import path points to the correct module at src/infra/mongo/connection.js.
Function names match the actual exports: connectMongo, disconnectMongo.
The test suite loads and all tests execute.
Testing Requirements:
Run npm test -- tests/issues-144-145-146-152.test.ts and verify tests pass.
Run npm test to confirm no regressions.
PR Checklist:
Branch is named conventionally (e.g., fix/issue-XX-issues-test-import).
npm run lint and npm run build pass with zero warnings.
Screenshot of passing Jest terminal logs is attached to the PR.
Domain: Testing
Issue [Bug] Fix
issues-144-145-146-152.test.tsinvalid module pathTier: 🟢 Easy
Description:
tests/issues-144-145-146-152.test.tsimportsconnectDBanddisconnectDBfrom'../src/infra/db/mongoose.js', but this path does not exist. The actual database connection module is atsrc/infra/mongo/connection.tsand exportsconnectMongoanddisconnectMongo. The entire test suite fails to load.import { connectMongo, disconnectMongo } from '../src/infra/mongo/connection.js'and update all references fromconnectDB()/disconnectDB()toconnectMongo()/disconnectMongo().Dependencies:
Acceptance Criteria:
src/infra/mongo/connection.js.connectMongo,disconnectMongo.Testing Requirements:
npm test -- tests/issues-144-145-146-152.test.tsand verify tests pass.npm testto confirm no regressions.PR Checklist:
fix/issue-XX-issues-test-import).npm run lintandnpm run buildpass with zero warnings.