diff --git a/packages/restapi/tests/lib/chat/createGroup.test.ts b/packages/restapi/tests/lib/chat/createGroup.test.ts index 5c8db3987..d9ea55a2e 100644 --- a/packages/restapi/tests/lib/chat/createGroup.test.ts +++ b/packages/restapi/tests/lib/chat/createGroup.test.ts @@ -127,8 +127,8 @@ const expectGroup = async ( expect(group.members[0].image).to.be.a('string'); expect(group.pendingMembers).to.be.an('array'); expect(group.pendingMembers.length).to.equal(pendingMembers.length); - expect(group.pendingMembers[0].wallet).to.equal(pendingMembers[0]); - expect(group.pendingMembers[1].wallet).to.equal(pendingMembers[1]); + expect(pendingMembers.includes(group.pendingMembers[0].wallet)).to.be.true; + expect(pendingMembers.includes(group.pendingMembers[1].wallet)).to.be.true; expect(group.groupImage).to.equal(groupImage); expect(group.groupName).to.equal(groupName); expect(group.groupDescription).to.equal(groupDescription); diff --git a/packages/restapi/tests/lib/chat/updateGroup.test.ts b/packages/restapi/tests/lib/chat/updateGroup.test.ts index 1ad448a69..86862853a 100644 --- a/packages/restapi/tests/lib/chat/updateGroup.test.ts +++ b/packages/restapi/tests/lib/chat/updateGroup.test.ts @@ -179,7 +179,7 @@ const expectGroup = async ( expect(group.pendingMembers).to.be.an('array'); expect(group.pendingMembers.length).to.equal(pendingMembers.length); for (let i = 0; i < pendingMembers.length; i++) { - expect(group.pendingMembers[i].wallet).to.equal(pendingMembers[i]); + expect(pendingMembers.includes(group.pendingMembers[i].wallet)).to.be.true; } expect(group.groupImage).to.equal(groupImage); expect(group.groupName).to.equal(groupName);