Skip to content

Commit cda1c2a

Browse files
author
siddsriv
committed
fix(middleware-sdk-s3): 200 exception tests refactored, scope issue fixed. all tests passing
1 parent 7642423 commit cda1c2a

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

packages/middleware-sdk-s3/src/throw-200-exceptions.spec.ts

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,16 @@ describe("throw200ExceptionsMiddlewareOptions", () => {
2727
// headers: {},
2828
// body: "",
2929
});
30+
31+
const handler = throw200ExceptionsMiddleware(mockConfig)(mockNextHandler, {} as any);
32+
const result = await handler({
33+
input: {},
34+
request: new HttpRequest({
35+
hostname: "s3.us-east-1.amazonaws.com",
36+
}),
37+
});
38+
expect(result.response).toBe(mockResponse);
3039
});
31-
const handler = throw200ExceptionsMiddleware(mockConfig)(mockNextHandler, {} as any);
32-
const result = await handler({
33-
input: {},
34-
request: new HttpRequest({
35-
hostname: "s3.us-east-1.amazonaws.com",
36-
}),
37-
});
38-
expect(result.response).toBe(mockResponse);
3940

4041
it("should throw if response body is empty", async () => {
4142
expect.assertions(3);

0 commit comments

Comments
 (0)