Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
zirkelc committed Mar 27, 2024
1 parent 4b2bce4 commit 5345e5a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/__tests__/create-signed-fetcher.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ describe("createSignedFetcher", () => {
expect(fetchMock).toHaveBeenCalled();
const [fetchUrl, fetchInit] = fetchMock.mock.calls[0];

expect(fetchUrl).toEqual(url);
expect(new URL(fetchUrl.toString())).toEqual(new URL(url.toString()));
expect(fetchInit.method).toEqual("GET");
expect(fetchInit.body).toEqual(undefined);
expect(fetchInit.headers).toEqual(expect.any(Object));
Expand All @@ -68,7 +68,7 @@ describe("createSignedFetcher", () => {
expect(fetchMock).toHaveBeenCalled();
const [fetchUrl, fetchInit] = fetchMock.mock.calls[0];

expect(fetchUrl).toEqual(url);
expect(new URL(fetchUrl.toString())).toEqual(new URL(url.toString()));
expect(fetchInit.method).toEqual(init.method.toUpperCase());
expect(fetchInit.body).toEqual(undefined);
expect(fetchInit.headers).toEqual(expect.any(Object));
Expand All @@ -91,7 +91,7 @@ describe("createSignedFetcher", () => {
expect(fetchMock).toHaveBeenCalled();
const [fetchUrl, fetchInit] = fetchMock.mock.calls[0];

expect(fetchUrl).toEqual(url);
expect(new URL(fetchUrl.toString())).toEqual(new URL(url.toString()));
expect(fetchInit.method).toEqual(init.method);
expect(fetchInit.body).toEqual(body);
expect(fetchInit.headers).toEqual(expect.any(Object));
Expand Down
2 changes: 2 additions & 0 deletions test/api-gateway/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ describe("APIGateway", () => {
const fetch = createSignedFetcher({
service: SERVICE,
region: REGION,
encodeRfc3986: true,
});

console.log(`${apiRootUrl}${path}`);
Expand All @@ -242,6 +243,7 @@ describe("APIGateway", () => {
const fetch = createSignedFetcher({
service: SERVICE,
region: REGION,
encodeRfc3986: true,
});

const response = await fetch(`${apiRootUrl}${path}`, {
Expand Down

0 comments on commit 5345e5a

Please sign in to comment.