File tree Expand file tree Collapse file tree 1 file changed +14
-20
lines changed
packages/middleware-sdk-transcribe-streaming/src Expand file tree Collapse file tree 1 file changed +14
-20
lines changed Original file line number Diff line number Diff line change @@ -2,28 +2,22 @@ import { HttpRequest } from "@aws-sdk/protocol-http";
2
2
import { SignatureV4 } from "./signer" ;
3
3
describe ( "transcribe streaming" , ( ) => {
4
4
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
- } ) ;
25
5
it ( "should invoke base SigV4 signer correctly" , async ( ) => {
26
6
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
+ } ) ;
27
21
const mockBaseSigner = {
28
22
presign : jest
29
23
. fn ( )
You can’t perform that action at this time.
0 commit comments