Skip to content

Commit 8e40541

Browse files
committed
production: * replace toEqual with toMatchObject in backend tests
1 parent 4e869f1 commit 8e40541

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

server/tests/api/2-update-post/post.api.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ describe(`${postApiPath} routes`, () => {
9999
});
100100

101101
expect(updatePostResponse.statusCode).toBe(HttpCode.FORBIDDEN);
102-
expect(getPostResponse.json()).toEqual(post);
102+
expect(getPostResponse.json()).toMatchObject(post);
103103
});
104104

105105
it(`should return ${HttpCode.OK} with updated post`, async () => {

server/tests/api/4-update-comment/comment.api.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ describe(`${commentApiPath} routes`, () => {
105105
});
106106

107107
expect(updateCommentResponse.statusCode).toBe(HttpCode.FORBIDDEN);
108-
expect(getCommentResponse.json()).toEqual(comment);
108+
expect(getCommentResponse.json()).toMatchObject(comment);
109109
});
110110

111111
it(`should return ${HttpCode.OK} with updated comment`, async () => {

0 commit comments

Comments
 (0)