Skip to content

Commit b60b2b2

Browse files
committed
test(client-s3): add types
1 parent 4fd8203 commit b60b2b2

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

clients/client-s3/test/integ/authSchemePreference.integ.spec.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { FinalizeRequestMiddleware } from "@smithy/types";
12
import { describe, expect, test as it } from "vitest";
23

34
import { S3 } from "@aws-sdk/client-s3";
@@ -9,20 +10,16 @@ describe("authSchemePreference", () => {
910
const Key = "key";
1011
const Body = "body";
1112

12-
const SIGNATURE_PREFIX = {
13+
const SIGNATURE_PREFIX: Record<string, string> = {
1314
sigv4: "AWS4-HMAC-SHA256",
1415
sigv4a: "AWS4-ECDSA-P256-SHA256",
1516
};
1617

17-
const interceptorMiddleware = (next, context) => (args) => {
18+
const interceptorMiddleware: FinalizeRequestMiddleware<any, any> = (next, context) => (args) => {
1819
// middleware intercept the request and return it early
1920
const request = args.request;
2021
return Promise.resolve({
21-
output: {
22-
$metadata: { attempts: 0, httpStatusCode: 200 },
23-
request,
24-
context,
25-
},
22+
output: { $metadata: { attempts: 0, httpStatusCode: 200 }, request, context },
2623
response: {},
2724
});
2825
};

0 commit comments

Comments
 (0)