Skip to content

Commit 7d41815

Browse files
committed
test: improve integration test
1 parent 1e614cf commit 7d41815

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

test/routes/gitlab/merge-request-hook.spec.ts

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,16 @@ describe('POST /gitlab', () => {
3030
headers: { 'x-gitlab-event': 'Merge Request Hook' },
3131
});
3232

33-
expect(result).toEqual(expect.objectContaining({ messages: expect.anything() }));
33+
expect(result).toEqual(
34+
expect.objectContaining({
35+
messages: [
36+
expect.objectContaining({
37+
twitchChat: expect.anything(),
38+
streamlabs: expect.anything(),
39+
}),
40+
],
41+
}),
42+
);
3443
});
3544

3645
it('handles merge request opened event', async () => {
@@ -46,7 +55,16 @@ describe('POST /gitlab', () => {
4655
headers: { 'x-gitlab-event': 'Merge Request Hook' },
4756
});
4857

49-
expect(result).toEqual(expect.objectContaining({ messages: expect.anything() }));
58+
expect(result).toEqual(
59+
expect.objectContaining({
60+
messages: [
61+
expect.objectContaining({
62+
twitchChat: expect.anything(),
63+
streamlabs: expect.anything(),
64+
}),
65+
],
66+
}),
67+
);
5068
});
5169
});
5270
});

0 commit comments

Comments
 (0)