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
yarn test or "npm run test" fails connect method of mongoose cannot be mocked.
As a result all of the test cases fail.
Version to Reproduce
Steps to Reproduce
npm install -g typescript-express-starter
npx typescript-express-starter nodeExpressTsSample
npm run test
Expected Behavior
The test cases should pass.
Actual Behavior
Test cases fail with error: TypeError: Cannot read property 'then' of undefined
mongoose_1.connect(database_1.dbConnection.url, database_1.dbConnection.options)
.then(() => {
^
logger_1.logger.info('🟢 The database is connected.');
If applicable, add screenshots to help explain your problem. -->
Additional Context
Capture screen
The text was updated successfully, but these errors were encountered:
Describe the Bug
yarn test or "npm run test" fails connect method of mongoose cannot be mocked.
As a result all of the test cases fail.
Version to Reproduce
Steps to Reproduce
npm install -g typescript-express-starter
npx typescript-express-starter nodeExpressTsSample
npm run test
Expected Behavior
The test cases should pass.
Actual Behavior
Test cases fail with error:
TypeError: Cannot read property 'then' of undefined
mongoose_1.connect(database_1.dbConnection.url, database_1.dbConnection.options)
.then(() => {
^
logger_1.logger.info('🟢 The database is connected.');
If applicable, add screenshots to help explain your problem. -->
Additional Context
Capture screen
The text was updated successfully, but these errors were encountered: