fix(test): fix test to reflect chat message updates
This commit is contained in:
parent
f9d0d66271
commit
8a4039217f
@ -25,14 +25,13 @@ test('send a chat message', async (done) => {
|
||||
|
||||
test('fetch chat messages by admin', async (done) => {
|
||||
const res = await getAdminResponse('chat/messages');
|
||||
const expectedBody = `<p>` + testMessage.body + `</p>`;
|
||||
|
||||
const message = res.body.filter((m) => m.body === testMessage.body)[0];
|
||||
const message = res.body.filter((m) => m.body === expectedBody)[0];
|
||||
if (!message) {
|
||||
throw new Error('Message not found');
|
||||
}
|
||||
|
||||
const expectedBody = testMessage.body;
|
||||
|
||||
expect(message.body).toBe(expectedBody);
|
||||
expect(message.user.displayName).toBe(userDisplayName);
|
||||
expect(message.type).toBe(testMessage.type);
|
||||
|
Loading…
x
Reference in New Issue
Block a user