Skip to content

Commit 6e86721

Browse files
committed
fix: address PR feedbacks
1 parent 4b148a3 commit 6e86721

File tree

1 file changed

+14
-20
lines changed

1 file changed

+14
-20
lines changed

packages/middleware-sdk-transcribe-streaming/src/signer.spec.ts

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,22 @@ import { HttpRequest } from "@aws-sdk/protocol-http";
22
import { SignatureV4 } from "./signer";
33
describe("transcribe streaming", () => {
44
describe("WebSocket request signer", () => {
5-
const toSign = new HttpRequest({
6-
headers: {
7-
"x-amz-foo": "foo",
8-
bar: "bar",
9-
"amz-sdk-invocation-id": "123",
10-
"amz-sdk-request": "attempt=1",
11-
host: "aws.amazon.com"
12-
},
13-
body: "hello world",
14-
query: {
15-
prop1: "A",
16-
prop2: "B"
17-
}
18-
});
19-
beforeEach(() => {
20-
jest.mock("@aws-sdk/protocol-http");
21-
((HttpRequest as any) as jest.Mock).mockReturnValue({
22-
isInstance: () => true
23-
});
24-
});
255
it("should invoke base SigV4 signer correctly", async () => {
266
expect.assertions(5);
7+
const toSign = new HttpRequest({
8+
headers: {
9+
"x-amz-foo": "foo",
10+
bar: "bar",
11+
"amz-sdk-invocation-id": "123",
12+
"amz-sdk-request": "attempt=1",
13+
host: "aws.amazon.com"
14+
},
15+
body: "hello world",
16+
query: {
17+
prop1: "A",
18+
prop2: "B"
19+
}
20+
});
2721
const mockBaseSigner = {
2822
presign: jest
2923
.fn()

0 commit comments

Comments
 (0)