Skip to content

Commit

Permalink
test: use JSON.stringify() as a workaround for now
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfy1339 committed Jul 10, 2023
1 parent 8a9a24e commit 6f472b0
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions test/scenarios/errors.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,16 @@ describe("api.github.com", () => {
expect(error.message).toEqual(
`Validation Failed: {"resource":"Label","code":"invalid","field":"color"}`,
);
expect(error.response.data.errors).toStrictEqual([
{
resource: "Label",
code: "invalid",
field: "color",
},
]);
// To-Do: Figure out why the objects are not strictly equal
expect(JSON.stringify(error.response.data.errors)).toStrictEqual(
JSON.stringify([
{
resource: "Label",
code: "invalid",
field: "color",
},
]),
);
expect(error.response.data.documentation_url).toMatch(
new RegExp("rest/reference/issues#create-a-label"),
);
Expand Down

0 comments on commit 6f472b0

Please sign in to comment.