Shiv2205 / SOEN_390_Team_20

https://soen-390-team-20.vercel.app/
2 stars 0 forks source link

Tests failing in accounts.test.js and login.test.js #16

Closed Shiv2205 closed 8 months ago

Shiv2205 commented 8 months ago

FAIL tests/unit/accounts.test.js (5.296 s) ● Express accounts › /users › should get user details

expect(received).toEqual(expected) // deep equality                                                                                             

- Expected  - 3                                                                                                                                 
+ Received  + 0                                                                                                                                 

  Object {                                                                                                                                      
-   "data": Object {                                                                                                                            
-     "name": "John Doe",
-   },
    "status": 200,
  }

  85 |       const response = await request(app).post("/users").send(req.body);
  86 |       expect(response.status).toEqual(200);
> 87 |       expect(response.body).toEqual({
     |                             ^
  88 |         status: 200,
  89 |         data: { name: "John Doe" },
  90 |       });

  at Object.toEqual (tests/unit/accounts.test.js:87:29)
Shiv2205 commented 8 months ago

commit 8013c7b fixes the bug