Skip to content

Commit f1c6903

Browse files
committed
chore: format testing package
1 parent cdb26e3 commit f1c6903

File tree

8 files changed

+19
-23
lines changed

8 files changed

+19
-23
lines changed

packages/testing/src/TestInvocationLogs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ class TestInvocationLogs {
8787
const parsedLog = TestInvocationLogs.parseFunctionLog(log);
8888

8989
return parsedLog.level === levelToFilter;
90-
} catch (error) {
90+
} catch {
9191
// If log is not from structured logging : such as metrics one.
9292
return (
9393
(log.split('\t')[2] as keyof typeof LogLevel) === levelToFilter

packages/testing/src/helpers.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { randomUUID } from 'node:crypto';
22
import {
3-
TEST_ARCHITECTURES,
4-
TEST_RUNTIMES,
53
defaultArchitecture,
64
defaultRuntime,
5+
TEST_ARCHITECTURES,
6+
TEST_RUNTIMES,
77
} from './constants.js';
88

99
const isValidRuntimeKey = (

packages/testing/src/index.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
export { TestStack } from './TestStack.js';
21
export {
3-
TEST_RUNTIMES,
4-
defaultRuntime,
5-
TEST_ARCHITECTURES,
62
defaultArchitecture,
3+
defaultRuntime,
74
LogLevel,
5+
TEST_ARCHITECTURES,
6+
TEST_RUNTIMES,
87
} from './constants.js';
98
export {
10-
isValidRuntimeKey,
11-
getRuntimeKey,
12-
generateTestUniqueName,
139
concatenateResourceName,
1410
findAndGetStackOutputValue,
11+
generateTestUniqueName,
1512
getArchitectureKey,
13+
getRuntimeKey,
14+
isValidRuntimeKey,
1615
} from './helpers.js';
1716
export { invokeFunction, invokeFunctionOnce } from './invokeTestFunction.js';
1817
export { TestInvocationLogs } from './TestInvocationLogs.js';
18+
export { TestStack } from './TestStack.js';

packages/testing/src/resources/TestDynamodbTable.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { randomUUID } from 'node:crypto';
22
import { CfnOutput, RemovalPolicy } from 'aws-cdk-lib';
33
import { AttributeType, BillingMode, Table } from 'aws-cdk-lib/aws-dynamodb';
4-
import type { TestStack } from '../TestStack.js';
54
import { concatenateResourceName } from '../helpers.js';
5+
import type { TestStack } from '../TestStack.js';
66
import type { ExtraTestProps, TestDynamodbTableProps } from '../types.js';
77

88
/**

packages/testing/src/resources/TestNodejsFunction.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ import { CfnOutput, Duration } from 'aws-cdk-lib';
33
import { Alias, Tracing } from 'aws-cdk-lib/aws-lambda';
44
import { NodejsFunction, OutputFormat } from 'aws-cdk-lib/aws-lambda-nodejs';
55
import { LogGroup, RetentionDays } from 'aws-cdk-lib/aws-logs';
6-
import type { TestStack } from '../TestStack.js';
76
import { TEST_ARCHITECTURES, TEST_RUNTIMES } from '../constants.js';
87
import {
98
concatenateResourceName,
109
getArchitectureKey,
1110
getRuntimeKey,
1211
} from '../helpers.js';
12+
import type { TestStack } from '../TestStack.js';
1313
import type { ExtraTestProps, TestNodejsFunctionProps } from '../types.js';
1414

1515
/**

packages/testing/src/setupEnv.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ expect.extend({
2121
const [rawMessage] = call;
2222
try {
2323
messages[idx] = JSON.parse(rawMessage);
24-
} catch (error) {
24+
} catch {
2525
messages[idx] = rawMessage;
2626
}
2727
if (this.equals(messages[idx], expected)) {
@@ -55,7 +55,7 @@ expect.extend({
5555
const [rawMessage] = call;
5656
try {
5757
messages[idx] = JSON.parse(rawMessage);
58-
} catch (error) {
58+
} catch {
5959
messages[idx] = rawMessage;
6060
}
6161
if (this.equals(messages[idx], expected)) {
@@ -119,7 +119,7 @@ expect.extend({
119119
const [rawMessage] = call;
120120
try {
121121
emfs[idx] = JSON.parse(rawMessage);
122-
} catch (error) {
122+
} catch {
123123
emfs[idx] = rawMessage;
124124
}
125125
const metrics = emfs[idx]._aws.CloudWatchMetrics;

packages/testing/tsconfig.cjs.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,5 @@
77
"rootDir": "./src",
88
"tsBuildInfoFile": ".tsbuildinfo/cjs.json"
99
},
10-
"include": [
11-
"./src/**/*"
12-
]
13-
}
10+
"include": ["./src/**/*"]
11+
}

packages/testing/tsconfig.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,5 @@
88
"composite": true,
99
"declaration": true
1010
},
11-
"include": [
12-
"./src/**/*"
13-
]
14-
}
11+
"include": ["./src/**/*"]
12+
}

0 commit comments

Comments
 (0)