Skip to content

Commit a0be64f

Browse files
authored
test: add spec typecheck to integration step (#6666)
* test: add spec typecheck to integration step * test(middleware-sdk-s3): update test tsconfig
1 parent 361a738 commit a0be64f

File tree

34 files changed

+85
-51
lines changed

34 files changed

+85
-51
lines changed

Makefile

+5
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ test-unit: build-s3-browser-bundle
1818
yarn g:vitest run -c vitest.config.clients.unit.ts
1919
npx jest -c jest.config.js
2020

21+
# typecheck for test code.
22+
test-types:
23+
npx tsc -p tsconfig.test.json
24+
2125
test-protocols: build-s3-browser-bundle
2226
yarn g:vitest run -c vitest.config.protocols.integ.ts
2327

@@ -26,6 +30,7 @@ test-integration: build-s3-browser-bundle
2630
yarn g:vitest run -c vitest.config.integ.ts
2731
npx jest -c jest.config.integ.js
2832
make test-protocols;
33+
make test-types;
2934

3035
test-e2e: build-s3-browser-bundle
3136
yarn g:vitest run -c vitest.config.e2e.ts --retry=4

clients/client-s3/test/e2e/S3.e2e.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ describe("@aws-sdk/client-s3", () => {
7777
const body = createBuffer("1MB");
7878
let bodyChecksum = "";
7979

80-
const bodyChecksumReader = (next) => async (args) => {
80+
const bodyChecksumReader = (next: any) => async (args: any) => {
8181
const checksumValue = args.request.headers["x-amz-checksum-crc32"];
8282
if (checksumValue) {
8383
bodyChecksum = checksumValue;

clients/client-s3/test/unit/flexibleChecksums.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ describe("Flexible Checksums", () => {
8484
expect(headers["transfer-encoding"]).to.equal("chunked");
8585
expect(headers["x-amz-content-sha256"]).to.equal("STREAMING-UNSIGNED-PAYLOAD-TRAILER");
8686
expect(headers["x-amz-trailer"]).to.equal(checksumHeader);
87-
body.on("data", (data) => {
87+
body.on("data", (data: any) => {
8888
const stringValue = data.toString();
8989
if (stringValue.startsWith(checksumHeader)) {
9090
const receivedChecksum = stringValue.replace("\r\n", "").split(":")[1];

packages/credential-provider-sso/src/resolveSSOCredentials.spec.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ describe(resolveSSOCredentials.name, () => {
160160

161161
it("creates SSO client with provided region, if client is not passed", async () => {
162162
const mockCustomSsoSend = vi.fn().mockResolvedValue({ roleCredentials: mockCreds });
163-
vi.mocked(SSOClient).mockReturnValue({ send: mockCustomSsoSend });
163+
vi.mocked(SSOClient as any).mockReturnValue({ send: mockCustomSsoSend });
164164

165165
await resolveSSOCredentials({ ...mockOptions, ssoClient: undefined });
166166
expect(mockCustomSsoSend).toHaveBeenCalledTimes(1);
@@ -176,7 +176,7 @@ describe(resolveSSOCredentials.name, () => {
176176

177177
it("creates SSO client with provided region, if client is not passed, and includes accountId", async () => {
178178
const mockCustomSsoSend = vi.fn().mockResolvedValue({ roleCredentials: mockCreds });
179-
vi.mocked(SSOClient).mockReturnValue({ send: mockCustomSsoSend });
179+
vi.mocked(SSOClient as any).mockReturnValue({ send: mockCustomSsoSend });
180180

181181
const result = await resolveSSOCredentials({ ...mockOptions, ssoClient: undefined });
182182
expect(result).toHaveProperty("accountId", mockOptions.ssoAccountId);

packages/credential-providers/src/fromTemporaryCredentials.spec.ts

+8-8
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ describe("fromTemporaryCredentials", () => {
6262
secretAccessKey: "SECRET_ACCESS_KEY",
6363
sessionToken: "SESSION_TOKEN",
6464
});
65-
expect(vi.mocked(STSClient)).toHaveBeenCalledWith({
65+
expect(vi.mocked(STSClient as any)).toHaveBeenCalledWith({
6666
credentials: masterCredentials,
6767
region,
6868
});
@@ -86,7 +86,7 @@ describe("fromTemporaryCredentials", () => {
8686
clientPlugins: [plugin],
8787
});
8888
await provider();
89-
expect(vi.mocked(STSClient)).toHaveBeenCalledWith({
89+
expect(vi.mocked(STSClient as any)).toHaveBeenCalledWith({
9090
credentials: masterCredentials,
9191
});
9292
expect(mockUsePlugin).toHaveBeenCalledTimes(1);
@@ -101,7 +101,7 @@ describe("fromTemporaryCredentials", () => {
101101
},
102102
});
103103
await provider();
104-
expect(vi.mocked(STSClient)).toHaveBeenCalledWith({});
104+
expect(vi.mocked(STSClient as any)).toHaveBeenCalledWith({});
105105
});
106106

107107
it("should create a role session name if none provided", async () => {
@@ -140,22 +140,22 @@ describe("fromTemporaryCredentials", () => {
140140
expect(credentials.accessKeyId).toBe("access_id_from_third");
141141
// Creates STS Client with right master credentials and assume role with
142142
// expected role arn.
143-
expect(vi.mocked(STSClient).mock.results.length).toBe(3);
144-
const outmostClient = vi.mocked(STSClient).mock.results[0].value;
143+
expect(vi.mocked(STSClient as any).mock.results.length).toBe(3);
144+
const outmostClient = vi.mocked(STSClient as any).mock.results[0].value;
145145
expect(outmostClient.config.credentials).toEqual(expect.objectContaining({ accessKeyId: "access_id_from_second" }));
146146
expect((outmostClient.send as any).mock.calls.length).toBe(1);
147147
expect((outmostClient.send as any).mock.calls[0][0].input).toEqual(
148148
expect.objectContaining({ RoleArn: roleArnOf("third") })
149149
);
150150

151-
const middleClient = vi.mocked(STSClient).mock.results[1].value;
151+
const middleClient = vi.mocked(STSClient as any).mock.results[1].value;
152152
expect(middleClient.config.credentials).toEqual(expect.objectContaining({ accessKeyId: "access_id_from_first" }));
153153
expect((middleClient.send as any).mock.calls.length).toBe(1);
154154
expect((middleClient.send as any).mock.calls[0][0].input).toEqual(
155155
expect.objectContaining({ RoleArn: roleArnOf("second") })
156156
);
157157

158-
const innermostClient = vi.mocked(STSClient).mock.results[2].value;
158+
const innermostClient = vi.mocked(STSClient as any).mock.results[2].value;
159159
expect(innermostClient.config.credentials).toEqual(undefined);
160160
expect((innermostClient.send as any).mock.calls.length).toBe(1);
161161
expect((innermostClient.send as any).mock.calls[0][0].input).toEqual(
@@ -169,7 +169,7 @@ describe("fromTemporaryCredentials", () => {
169169

170170
// Should not create extra clients if credentials is still valid
171171
await provider();
172-
expect(vi.mocked(STSClient).mock.results.length).toBe(3);
172+
expect(vi.mocked(STSClient as any).mock.results.length).toBe(3);
173173
});
174174

175175
it("should support assuming a role with multi-factor authentication", async () => {

packages/eventstream-handler-node/src/EventStreamPayloadHandler.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ describe(EventStreamPayloadHandler.name, () => {
2929

3030
beforeEach(() => {
3131
(EventSigningStream as unknown as any).mockImplementation(() => new PassThrough());
32-
vi.mocked(EventStreamCodec).mockImplementation(() => {});
32+
vi.mocked(EventStreamCodec).mockImplementation((() => {}) as any);
3333
});
3434

3535
afterEach(() => {

packages/middleware-bucket-endpoint/src/bucketHostname.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { parse as parseArn } from "@aws-sdk/util-arn-parser";
2-
import { describe, expect, expect, test as it } from "vitest";
2+
import { describe, expect, test as it } from "vitest";
33

44
import { bucketHostname } from "./bucketHostname";
55

packages/middleware-endpoint-discovery/src/getEndpointDiscoveryPlugin.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ describe(getEndpointDiscoveryPlugin.name, () => {
1818

1919
it(`applyToStack function adds endpoint discovery middleware`, () => {
2020
const middlewareReturn = {};
21-
vi.mocked(endpointDiscoveryMiddleware).mockReturnValueOnce(middlewareReturn);
21+
vi.mocked(endpointDiscoveryMiddleware).mockReturnValueOnce(middlewareReturn as any);
2222

2323
// @ts-ignore
2424
const plugin = getEndpointDiscoveryPlugin(pluginConfig, middlewareConfig);

packages/middleware-flexible-checksums/src/resolveFlexibleChecksumsConfig.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ vi.mock("@smithy/util-middleware");
1313

1414
describe(resolveFlexibleChecksumsConfig.name, () => {
1515
beforeEach(() => {
16-
vi.mocked(normalizeProvider).mockImplementation((input) => input);
16+
vi.mocked(normalizeProvider).mockImplementation((input) => input as any);
1717
});
1818

1919
afterEach(() => {

packages/middleware-flexible-checksums/src/validateChecksumFromResponse.spec.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,12 @@ describe(validateChecksumFromResponse.name, () => {
5151

5252
beforeEach(() => {
5353
vi.mocked(getChecksumLocationName).mockImplementation((algorithm) => algorithm);
54-
vi.mocked(getChecksumAlgorithmListForResponse).mockImplementation((responseAlgorithms) => responseAlgorithms);
54+
vi.mocked(getChecksumAlgorithmListForResponse).mockImplementation(
55+
(responseAlgorithms) => responseAlgorithms as any
56+
);
5557
vi.mocked(selectChecksumAlgorithmFunction).mockReturnValue(mockChecksumAlgorithmFn);
5658
vi.mocked(getChecksum).mockResolvedValue(mockChecksum);
57-
vi.mocked(createChecksumStream).mockReturnValue(mockBodyStream);
59+
vi.mocked(createChecksumStream).mockReturnValue(mockBodyStream as any);
5860
});
5961

6062
afterEach(() => {

packages/middleware-host-header/src/index.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { HttpRequest } from "@smithy/protocol-http";
2-
import { beforeEach, describe, expect, expect, test as it, vi } from "vitest";
2+
import { beforeEach, describe, expect, test as it, vi } from "vitest";
33

44
import { hostHeaderMiddleware } from "./index";
55
describe("hostHeaderMiddleware", () => {

packages/middleware-location-constraint/src/middleware-location-constraint.integ.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { S3 } from "@aws-sdk/client-s3";
2-
import { describe, expect, expect, test as it } from "vitest";
2+
import { describe, expect, test as it } from "vitest";
33

44
import { requireRequestsFrom } from "../../../private/aws-util-test/src";
55

packages/middleware-sdk-rds/src/middleware-sdk-rds.integ.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { RDS } from "@aws-sdk/client-rds";
2-
import { describe, expect, expect, test as it } from "vitest";
2+
import { describe, expect, test as it } from "vitest";
33

44
import { TestHttpHandler } from "../../../private/aws-util-test/src";
55

packages/middleware-sdk-route53/src/middleware-sdk-route53.integ.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Route53 } from "@aws-sdk/client-route-53";
22
import { XMLParser } from "fast-xml-parser";
3-
import { describe, expect, expect, test as it } from "vitest";
3+
import { describe, expect, test as it } from "vitest";
44

55
import { requireRequestsFrom } from "../../../private/aws-util-test/src";
66

packages/middleware-sdk-s3-control/src/process-arnables-plugin/getProcessArnablesPlugin.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { constructStack } from "@smithy/middleware-stack";
22
import { HttpRequest } from "@smithy/protocol-http";
33
import { Provider, RegionInfo } from "@smithy/types";
4-
import { beforeEach, describe, expect, expect, test as it, vi } from "vitest";
4+
import { beforeEach, describe, expect, test as it, vi } from "vitest";
55

66
import { S3ControlResolvedConfig } from "../configurations";
77
import { getProcessArnablesPlugin } from "./getProcessArnablesPlugin";

packages/middleware-sdk-s3/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
"build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
1111
"clean": "rimraf ./dist-* && rimraf *.tsbuildinfo",
1212
"test": "yarn g:vitest run",
13-
"test:integration": "yarn g:vitest run -c vitest.config.integ.ts",
13+
"test:types": "tsc -p tsconfig.test.json",
14+
"test:integration": "yarn g:vitest run -c vitest.config.integ.ts && yarn test:types",
1415
"test:e2e": "yarn g:vitest run -c vitest.config.e2e.ts --mode development",
1516
"extract:docs": "api-extractor run --local",
1617
"test:watch": "yarn g:vitest watch",

packages/middleware-sdk-s3/src/check-content-length-header.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { checkContentLengthHeader } from "./check-content-length-header";
66
describe("checkContentLengthHeaderMiddleware", () => {
77
const mockNextHandler = vi.fn();
88

9-
let spy: vi.SpyInstance;
9+
let spy: any;
1010

1111
beforeEach(() => {
1212
spy = vi.spyOn(console, "warn");

packages/middleware-sdk-s3/src/middleware-sdk-s3.integ.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { S3 } from "@aws-sdk/client-s3";
2-
import { describe, expect, expect, test as it, vi } from "vitest";
2+
import { describe, expect, test as it, vi } from "vitest";
33

44
import { requireRequestsFrom } from "../../../private/aws-util-test/src";
55

packages/middleware-sdk-s3/src/s3-express/middleware-s3-express.e2e.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ async function createClientAndRecorder() {
215215
}
216216

217217
const commandName = context.commandName + s3ExpressSuffix;
218-
const input = args.input;
218+
const input = args.input as any;
219219
const commandRecorder = (recorder.calls[commandName] = recorder.calls[commandName] ?? {});
220220
commandRecorder[input["Bucket"] ?? "-"] |= 0;
221221
commandRecorder[input["Bucket"] ?? "-"]++;

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { HttpRequest, HttpResponse } from "@smithy/protocol-http";
22
import { toUtf8 } from "@smithy/util-utf8";
33
import { Readable } from "stream";
4-
import { beforeEach, describe, expect, expect, test as it, vi } from "vitest";
4+
import { beforeEach, describe, expect, test as it, vi } from "vitest";
55

66
import { throw200ExceptionsMiddleware } from "./throw-200-exceptions";
77

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"compilerOptions": {
3+
"baseUrl": ".",
4+
"rootDir": "src",
5+
"skipLibCheck": true,
6+
"noEmit": true
7+
},
8+
"extends": "../../tsconfig.cjs.json",
9+
"include": ["src/**/s3-type-transforms.integ.spec.ts"],
10+
"exclude": []
11+
}

packages/middleware-sdk-sqs/src/middleware-sdk-sqs.integ.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { HttpHandler, HttpResponse } from "@smithy/protocol-http";
33
import type { AwsCredentialIdentity } from "@smithy/types";
44
import crypto from "crypto";
55
import { Readable } from "stream";
6-
import { beforeEach, describe, expect, expect, test as it } from "vitest";
6+
import { beforeEach, describe, expect, test as it } from "vitest";
77

88
import { requireRequestsFrom } from "../../../private/aws-util-test/src";
99

packages/middleware-signing/src/awsAuthMiddleware.spec.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { HttpRequest } from "@smithy/protocol-http";
2-
import { FinalizeHandler, RequestSigner } from "@smithy/types";
2+
import { RequestSigner } from "@smithy/types";
33
import { afterEach, beforeEach, describe, expect, test as it, vi } from "vitest";
44

55
import { AwsAuthResolvedConfig } from "./awsAuthConfiguration";
@@ -11,11 +11,11 @@ vi.mock("./utils/getUpdatedSystemClockOffset");
1111
vi.mock("./utils/getSkewCorrectedDate");
1212

1313
describe(awsAuthMiddleware.name, () => {
14-
let mockSignFn: vi.Mock<any, any>;
14+
let mockSignFn: any;
1515
let mockSigner: () => Promise<RequestSigner>;
1616
let mockOptions: AwsAuthResolvedConfig;
1717

18-
const mockNext: vi.MockedFunction<FinalizeHandler<any, any>> = vi.fn();
18+
const mockNext: any = vi.fn();
1919
const mockSystemClockOffset = 100;
2020
const mockUpdatedSystemClockOffset = 500;
2121
const mockSigningHandlerArgs = {

packages/middleware-token/src/getTokenPlugin.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ describe(getTokenPlugin.name, () => {
1818

1919
it("applyToStack adds tokenMiddleware", () => {
2020
const middlewareReturn = {};
21-
vi.mocked(tokenMiddleware).mockReturnValueOnce(middlewareReturn);
21+
vi.mocked(tokenMiddleware).mockReturnValueOnce(middlewareReturn as any);
2222

2323
// @ts-ignore
2424
const plugin = getTokenPlugin(pluginConfig);

packages/middleware-token/src/normalizeTokenProvider.spec.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { memoize } from "@smithy/property-provider";
22
import { normalizeProvider } from "@smithy/util-middleware";
3-
import { afterEach, beforeEach, describe, expect, expect, test as it, vi } from "vitest";
3+
import { afterEach, beforeEach, describe, expect, test as it, vi } from "vitest";
44

55
import { normalizeTokenProvider } from "./normalizeTokenProvider";
66

@@ -73,13 +73,13 @@ describe(normalizeTokenProvider.name, () => {
7373
});
7474

7575
it("returns true if expiration is not defined", () => {
76-
const memoizeRefreshFn = vi.mocked(memoize).mock.calls[0][2];
76+
const memoizeRefreshFn = vi.mocked(memoize).mock.calls[0][2]!;
7777
const expiration = Date.now();
7878
expect(memoizeRefreshFn({ expiration })).toEqual(true);
7979
});
8080

8181
it("returns false if expiration is not defined", () => {
82-
const memoizeRefreshFn = vi.mocked(memoize).mock.calls[0][2];
82+
const memoizeRefreshFn = vi.mocked(memoize).mock.calls[0][2]!;
8383
expect(memoizeRefreshFn({})).toEqual(false);
8484
});
8585
});

packages/middleware-user-agent/src/check-features.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ describe(checkFeatures.name, () => {
1515
identity: {
1616
accountId: "123456789012",
1717
$source: {},
18-
},
18+
} as any,
1919
},
2020
},
2121
} as AwsHandlerExecutionContext;

packages/middleware-user-agent/src/user-agent-middleware.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { setPartitionInfo, useDefaultPartitionInfo } from "@aws-sdk/util-endpoints";
22
import { HttpRequest } from "@smithy/protocol-http";
33
import { UserAgentPair } from "@smithy/types";
4-
import { afterEach, beforeEach, describe, expect, expect, test as it, vi } from "vitest";
4+
import { afterEach, beforeEach, describe, expect, test as it, vi } from "vitest";
55

66
import { USER_AGENT, X_AMZ_USER_AGENT } from "./constants";
77
import { userAgentMiddleware } from "./user-agent-middleware";

packages/middleware-websocket/src/EventStreamPayloadHandler.spec.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { EventStreamCodec } from "@smithy/eventstream-codec";
22
import { Decoder, Encoder, FinalizeHandler, FinalizeHandlerArguments, HttpRequest, MessageSigner } from "@smithy/types";
3-
import { afterEach, beforeEach, describe, expect, expect, test as it, vi } from "vitest";
3+
import { afterEach, beforeEach, describe, expect, test as it, vi } from "vitest";
44
import { ReadableStream, TransformStream } from "web-streams-polyfill";
55

66
import { EventStreamPayloadHandler } from "./EventStreamPayloadHandler";
@@ -21,7 +21,7 @@ describe(EventStreamPayloadHandler.name, () => {
2121
beforeEach(() => {
2222
window.TransformStream = TransformStream;
2323
(getEventSigningTransformStream as unknown as any).mockImplementation(() => new TransformStream());
24-
vi.mocked(EventStreamCodec).mockImplementation(() => {});
24+
vi.mocked(EventStreamCodec).mockImplementation((() => {}) as any);
2525
});
2626

2727
afterEach(() => {

packages/middleware-websocket/src/websocket-fetch-handler.spec.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { FetchHttpHandler } from "@smithy/fetch-http-handler";
22
import { HttpRequest } from "@smithy/protocol-http";
33
import { WebSocket } from "mock-socket";
44
import { PassThrough } from "stream";
5-
import { afterEach, beforeEach, describe, expect, expect, test as it, vi } from "vitest";
5+
import { afterEach, beforeEach, describe, expect, test as it, vi } from "vitest";
66
import WS from "vitest-websocket-mock";
77

88
import { WebSocketFetchHandler } from "./websocket-fetch-handler";
@@ -139,7 +139,7 @@ describe(WebSocketFetchHandler.name, () => {
139139
expect(err.$metadata).toBeDefined();
140140
expect(err.$metadata.httpStatusCode >= 500).toBe(true);
141141
expect(
142-
((global as any).setTimeout as any).mock.calls.filter((args) => {
142+
((global as any).setTimeout as any).mock.calls.filter((args: any) => {
143143
//find the 'setTimeout' call from the websocket handler
144144
return args[0].toString().indexOf("$metadata") >= 0;
145145
})[0][1]

packages/token-providers/src/fromSso.spec.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ describe(fromSso.name, () => {
7474

7575
describe("throws validation error", () => {
7676
it("when profile is not found", async () => {
77-
vi.mocked(parseKnownFiles).mockReturnValue({});
77+
vi.mocked(parseKnownFiles as any).mockReturnValue({});
7878
const expectedError = new TokenProviderError(
7979
`Profile '${mockProfileName}' could not be found in shared credentials file.`,
8080
false
@@ -84,7 +84,7 @@ describe(fromSso.name, () => {
8484

8585
it("when sso_session is not defined for profile", async () => {
8686
const { sso_session, ...mockSsoProfileWithoutSsoSession } = mockSsoProfile;
87-
vi.mocked(parseKnownFiles).mockReturnValue({ [mockProfileName]: mockSsoProfileWithoutSsoSession });
87+
vi.mocked(parseKnownFiles as any).mockReturnValue({ [mockProfileName]: mockSsoProfileWithoutSsoSession });
8888
const expectedError = new TokenProviderError(
8989
`Profile '${mockProfileName}' is missing required property 'sso_session'.`
9090
);

0 commit comments

Comments
 (0)