Skip to content

Commit

Permalink
fix(commons): rename tests subfolder to samples to avoid being delete…
Browse files Browse the repository at this point in the history
…d by tools such as node-prune (#882)

* rename commons sub folder from tests to samples

* update doc

Co-authored-by: Florian Chazal <chazalf@amazon.com>
  • Loading branch information
flochaz and Florian Chazal authored May 25, 2022
1 parent b7eaeac commit 74ef816
Show file tree
Hide file tree
Showing 54 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/core/logger.md
Original file line number Diff line number Diff line change
Expand Up @@ -787,4 +787,4 @@ This is a Jest sample that provides the minimum information necessary for Logger
```

!!! tip
If you don't want to declare your own dummy Lambda Context, you can use [`ContextExamples.helloworldContext`](https://github.com/awslabs/aws-lambda-powertools-typescript/blob/main/packages/commons/src/tests/resources/contexts/hello-world.ts#L3-L16) from [`@aws-lambda-powertools/commons`](https://www.npmjs.com/package/@aws-lambda-powertools/commons).
If you don't want to declare your own dummy Lambda Context, you can use [`ContextExamples.helloworldContext`](https://github.com/awslabs/aws-lambda-powertools-typescript/blob/main/packages/commons/src/samples/resources/contexts/hello-world.ts#L3-L16) from [`@aws-lambda-powertools/commons`](https://www.npmjs.com/package/@aws-lambda-powertools/commons).
4 changes: 2 additions & 2 deletions packages/commons/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export * from './utils/lambda';
export * from './Utility';
export * as ContextExamples from './tests/resources/contexts';
export * as Events from './tests/resources/events';
export * as ContextExamples from './samples/resources/contexts';
export * as Events from './samples/resources/events';

0 comments on commit 74ef816

Please sign in to comment.