Skip to content

Commit 7d6f3e6

Browse files
committed
Squashed PR that I need
1 parent 87b7e4a commit 7d6f3e6

File tree

164 files changed

+489
-430
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

164 files changed

+489
-430
lines changed

packages/aws-cdk-lib/assertions/test/match.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ describe('Matchers', () => {
423423
function expectPass(matcher: Matcher, target: any): void {
424424
const result = matcher.test(target);
425425
if (result.hasFailed()) {
426-
throw new Error(result.toHumanStrings().join('\n')); // eslint-disable-line jest/no-jasmine-globals
426+
throw new Error(result.toHumanStrings().join('\n'));
427427
}
428428
}
429429

packages/aws-cdk-lib/aws-apigateway/test/integration.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { Match, Template } from '../../assertions';
22
import * as ec2 from '../../aws-ec2';
33
import * as elbv2 from '../../aws-elasticloadbalancingv2';
44
import * as iam from '../../aws-iam';
5-
import { Runtime, Code, Function } from '../../aws-lambda';
65
import * as cdk from '../../core';
76
import * as apigw from '../lib';
87

packages/aws-cdk-lib/aws-apigateway/test/lambda-api.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ describe('LambdaRestApi inherits from RestApi prop injector test ', () => {
446446
this.constructUniqueId = apigw.RestApi.PROPERTY_INJECTION_ID;
447447
}
448448

449-
inject(originalProps: apigw.RestApiProps, context: cdk.InjectionContext): apigw.RestApiProps {
449+
inject(originalProps: apigw.RestApiProps, _context: cdk.InjectionContext): apigw.RestApiProps {
450450
return {
451451
endpointTypes: [apigw.EndpointType.REGIONAL],
452452
deploy: false,

packages/aws-cdk-lib/aws-apigateway/test/restapi.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1811,7 +1811,7 @@ describe('SpecRestApi', () => {
18111811
const api = apigw.RestApi.fromRestApiId(stack, 'Api', 'api-id');
18121812

18131813
// THEN
1814-
const result = api.addToResourcePolicy(new iam.PolicyStatement({
1814+
const result = (api as any).addToResourcePolicy(new iam.PolicyStatement({
18151815
actions: ['execute-api:Invoke'],
18161816
resources: [Stack.of(stack).formatArn({
18171817
service: 'execute-api',
@@ -1831,7 +1831,7 @@ describe('SpecRestApi', () => {
18311831
});
18321832

18331833
// THEN
1834-
const result = api.addToResourcePolicy(new iam.PolicyStatement({
1834+
const result = (api as any).addToResourcePolicy(new iam.PolicyStatement({
18351835
actions: ['execute-api:Invoke'],
18361836
resources: [Stack.of(stack).formatArn({
18371837
service: 'execute-api',

packages/aws-cdk-lib/aws-apigatewayv2-authorizers/test/http/jwt.test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,11 @@ describe('HttpJwtAuthorizer', () => {
7979

8080
test('should throw error when acessing authorizer before it been bound to route', () => {
8181
// GIVEN
82-
const stack = new Stack();
8382
const t = () => {
8483
const authorizer = new HttpJwtAuthorizer('BooksAuthorizer', 'https://test.us.auth0.com', {
8584
jwtAudience: ['3131231'],
8685
});
87-
const authorizerId = authorizer.authorizerId;
86+
void(authorizer.authorizerId);
8887
};
8988

9089
// THEN

packages/aws-cdk-lib/aws-apigatewayv2-authorizers/test/http/lambda.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ describe('HttpLambdaAuthorizer', () => {
194194

195195
const t = () => {
196196
const authorizer = new HttpLambdaAuthorizer('BooksAuthorizer', handler);
197-
const authorizerId = authorizer.authorizerId;
197+
void(authorizer.authorizerId);
198198
};
199199

200200
// THEN

packages/aws-cdk-lib/aws-apigatewayv2-authorizers/test/http/user-pool.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ describe('HttpUserPoolAuthorizer', () => {
137137
const authorizer = new HttpUserPoolAuthorizer('BooksAuthorizer', userPool, {
138138
userPoolClients: [userPoolClient1, userPoolClient2],
139139
});
140-
const authorizerId = authorizer.authorizerId;
140+
void(authorizer.authorizerId);
141141
};
142142

143143
// THEN

packages/aws-cdk-lib/aws-apigatewayv2/test/http/domain-name.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ describe('DomainName', () => {
340340

341341
test.each([IpAddressType.IPV4, IpAddressType.DUAL_STACK])('ipAddressType is set', (ipAddressType) => {
342342
const stack = new Stack();
343-
const dn = new DomainName(stack, 'DomainName', {
343+
new DomainName(stack, 'DomainName', {
344344
domainName,
345345
certificate: Certificate.fromCertificateArn(stack, 'cert', certArn),
346346
ipAddressType,

packages/aws-cdk-lib/aws-apigatewayv2/test/websocket/api-key.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ describe('api key', () => {
251251
// GIVEN
252252
const stack = new cdk.Stack();
253253
const api = new WebSocketApi(stack, 'test-api');
254-
const stage = WebSocketStage.fromWebSocketStageAttributes(stack, 'Stage', {
254+
WebSocketStage.fromWebSocketStageAttributes(stack, 'Stage', {
255255
api: api,
256256
stageName: 'MyStage',
257257
});

packages/aws-cdk-lib/aws-appsync/test/appsync-environment-variables.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ describe('environment variables', () => {
188188

189189
test('throws if length of key-value pairs for environment variables is greater than 50', () => {
190190
// WHEN
191-
const vars = {};
191+
const vars: Record<string, string> = {};
192192
for (let i = 0; i < 51; i++) {
193193
vars[`EnvKey${i}`] = `non-empty-${i}`;
194194
}

0 commit comments

Comments
 (0)