Skip to content

Commit bafbe2a

Browse files
authored
chore(testing-sdk): improve exported types and jsdoc in testing library (#350)
*Issue #, if available:* *Description of changes:* The testing library has missing JSDoc, and exposes some internals that are not necessary. Also updating the README contents to be more accurate and use correct terminology. By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
1 parent 277d085 commit bafbe2a

File tree

30 files changed

+1240
-450
lines changed

30 files changed

+1240
-450
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
This repository contains the code for the following 3 packages published to NPM:
44

5-
* [@aws/durable-execution-sdk-js](https://github.com/aws/aws-durable-execution-sdk-js/tree/main/packages/aws-durable-execution-sdk-js)
6-
* [@aws/durable-execution-sdk-js-testing](https://github.com/aws/aws-durable-execution-sdk-js/tree/main/packages/aws-durable-execution-sdk-js-testing)
7-
* [@aws/durable-execution-sdk-js-eslint-plugin](https://github.com/aws/aws-durable-execution-sdk-js/tree/main/packages/aws-durable-execution-sdk-js-eslint-plugin)
5+
- [@aws/durable-execution-sdk-js](https://github.com/aws/aws-durable-execution-sdk-js/tree/main/packages/aws-durable-execution-sdk-js)
6+
- [@aws/durable-execution-sdk-js-testing](https://github.com/aws/aws-durable-execution-sdk-js/tree/main/packages/aws-durable-execution-sdk-js-testing)
7+
- [@aws/durable-execution-sdk-js-eslint-plugin](https://github.com/aws/aws-durable-execution-sdk-js/tree/main/packages/aws-durable-execution-sdk-js-eslint-plugin)
88

9-
The repository also contains example durable execution located [here](https://github.com/aws/aws-durable-execution-sdk-js/tree/main/packages/aws-durable-execution-sdk-js-examples).
9+
The repository also contains example durable functions located [here](https://github.com/aws/aws-durable-execution-sdk-js/tree/main/packages/aws-durable-execution-sdk-js-examples).
1010

1111
## Security
1212

packages/aws-durable-execution-sdk-js-eslint-plugin/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# @aws/durable-execution-sdk-js-eslint-plugin
1+
# AWS Durable Execution ESLint Plugin
22

3-
ESLint plugin for AWS Lambda durable functions best practices.
3+
ESLint plugin for AWS Durable Execution SDK best practices.
44

55
## Installation
66

packages/aws-durable-execution-sdk-js-examples/src/utils/test-helper.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1+
import { LambdaClient } from "@aws-sdk/client-lambda";
2+
import { DurableLambdaHandler } from "@aws/durable-execution-sdk-js";
13
import {
24
LocalDurableTestRunner,
35
CloudDurableTestRunner,
46
DurableTestRunner,
57
DurableOperation,
6-
LocalTestRunnerHandlerFunction,
78
InvocationType,
89
} from "@aws/durable-execution-sdk-js-testing";
910

@@ -16,7 +17,7 @@ type TestCallback<ResultType> = (
1617
export interface TestDefinition<ResultType> {
1718
name: string;
1819
functionName: string;
19-
handler: LocalTestRunnerHandlerFunction;
20+
handler: DurableLambdaHandler;
2021
tests: TestCallback<ResultType>;
2122
invocationType?: InvocationType;
2223
localRunnerConfig?: {
@@ -66,9 +67,9 @@ export function createTests<ResultType>(testDef: TestDefinition<ResultType>) {
6667

6768
const runner = new CloudDurableTestRunner<ResultType>({
6869
functionName,
69-
clientConfig: {
70+
client: new LambdaClient({
7071
endpoint: process.env.LAMBDA_ENDPOINT,
71-
},
72+
}),
7273
config: {
7374
invocationType: testDef.invocationType,
7475
},

0 commit comments

Comments
 (0)