Skip to content

Commit

Permalink
test: update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Aug 16, 2023
1 parent a953a33 commit db2ad50
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,16 +168,16 @@ describe("ofetch", () => {
method: "POST",
body: data,
});
expect(body).to.eq("foo=bar");
expect(body).toMatchObject({ foo: 'bar' });
});

it("404", async () => {
const error = await $fetch(getURL("404")).catch((error_) => error_);
expect(error.toString()).to.contain("Cannot find any route matching /404.");
expect(error.toString()).to.contain("Cannot find any path matching /404.");
expect(error.data).to.deep.eq({
stack: [],
statusCode: 404,
statusMessage: "Cannot find any route matching /404.",
statusMessage: "Cannot find any path matching /404.",
});
expect(error.response?._data).to.deep.eq(error.data);
expect(error.request).to.equal(getURL("404"));
Expand Down

0 comments on commit db2ad50

Please sign in to comment.