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
{{ message }}
This repository has been archived by the owner on Nov 8, 2018. It is now read-only.
As a programmer,
I need the unit tests to work properly,
so that I can have the app function without any glitches.
Currently one of the test related to authentication is failing -
Executing (default): SELECT id, fname, lname, email, password, verificationStatus, resetPasswordToken, resetPasswordExpires, provider, google_id, google_token FROM user_accounts AS user_account WHERE user_account.email = '[email protected]' LIMIT 1;
POST /auth/login 200 6.072 ms - 61
1) "before all" hook: Login
Executing (default): DELETE FROM user_accounts WHERE email = '[email protected]'
3 passing (275ms)
1 failing
Testing APIs Creating User Authentication "before all" hook: Login:
Uncaught TypeError: Cannot read property 'email' of undefined
at Test. (test/test.js:94:34)
at Test.assert (node_modules/supertest/lib/test.js:179:6)
at assert (node_modules/supertest/lib/test.js:131:12)
at node_modules/supertest/lib/test.js:128:5
at Test.Request.callback (node_modules/superagent/lib/node/index.js:706:12)
at parser (node_modules/superagent/lib/node/index.js:906:18)
at IncomingMessage.res.on.e (node_modules/superagent/lib/node/parsers/json.js:19:7)
at endReadableNT (_stream_readable.js:974:12)
at _combinedTickCallback (internal/process/next_tick.js:80:11)
at process._tickCallback (internal/process/next_tick.js:104:9)
It is happening because we are calling a email API in the unit tests. We need to find another way to test this.
Acceptance Criteria
Update [Required]
Correct the unit test
Definition of Done
All of the required items are completed.
Approval by 1 mentor.
Estimation
1-2 hours
The text was updated successfully, but these errors were encountered:
@paavininanda I would suggest renaming it to "Using Mocks for Unit Tests with external Dependencies". It would be more generalized and will be true for every other sevice.
Description
As a programmer,
I need the unit tests to work properly,
so that I can have the app function without any glitches.
Currently one of the test related to authentication is failing -
It is happening because we are calling a email API in the unit tests. We need to find another way to test this.
Acceptance Criteria
Update [Required]
Definition of Done
Estimation
1-2 hours
The text was updated successfully, but these errors were encountered: