Skip to content

I have in issue in authRoute.spec.js where 2 tests are failing. Don't know why? #1

@aimalexe

Description

@aimalexe
  • The first failing test is:
    it('should send name, email, _id but not password ', async ()=>{ const res = await happyPath(); expect(res.body.password).toBeUndefined(); //! This is passing expect(Object.keys(res.body)).toEqual(expect.arrayContaining([ '_id', 'name', 'email' ])); //? Why this is failing });

  • The second failing test is:
    it('should return 200 if a valid user', async ()=>{ const res = await happyPath(); //? Why this is failing. expect(res.statusCode).toBe(200); });

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueGood for newcomershelp wantedExtra attention is neededquestionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions