From abb62fb74a8b0967219ac3e7aa5c9d3ac14958a7 Mon Sep 17 00:00:00 2001 From: Sebastian-Webster <84299475+Sebastian-Webster@users.noreply.github.com> Date: Thu, 26 Sep 2024 05:10:07 +1200 Subject: [PATCH] remove _id requirement from signin tests --- tests/user/signin.test.js | 3 +-- tests/user/signup.test.js | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/user/signin.test.js b/tests/user/signin.test.js index 47c215b5..55a0596c 100644 --- a/tests/user/signin.test.js +++ b/tests/user/signin.test.js @@ -291,7 +291,7 @@ describe('When Email 2FA is not enabled', () => { } test('if login works', async () => { - expect.assertions(12); + expect.assertions(11); await new User(userData).save(); @@ -343,7 +343,6 @@ describe('When Email 2FA is not enabled', () => { expect(includesNotIncludedKey).toBe(false); expect(typeof returned.data.data.followers).toBe("number"); expect(typeof returned.data.data.following).toBe("number"); - expect(typeof returned.data.data._id).toBe("string"); //End of test if correct user data gets returned diff --git a/tests/user/signup.test.js b/tests/user/signup.test.js index cbec0d2f..191a5ecb 100644 --- a/tests/user/signup.test.js +++ b/tests/user/signup.test.js @@ -264,7 +264,7 @@ test('if signup fails if a user with the same name already exists', async () => for (const validUserEmail of VALID_EMAILS) { test(`if user account creation is successful with correct inputs. Email tested: ${validUserEmail}`, async () => { - expect.assertions(21); + expect.assertions(20); const benchmarkUserData = { name: validName,