Maintenance: Split Rest Event Handler BaseRouter Tests Into Multiple Files
Closed this issue · 4 comments
Summary
The packages/event-handler/tests/unit/rest/BaseRouter.test.ts file is nearly 1900 lines in size and will only get bigger as we add more functionality to this event handler. We should break this monolith up in multiple files that test different areas of functionality. We can use the describe blocks as a guide on how to split the tests up.
Why is this needed?
The cognitive load of such a large file slows development and makes the suite harder to extend.
Which area does this relate to?
Tests
Solution
We should break this monolith up in multiple files that test different areas of functionailty. We can use the describe blocks as a guide on how to split the tests up.
Acknowledgment
- This request meets Powertools for AWS Lambda (TypeScript) Tenets
- Should this be considered in other Powertools for AWS Lambda languages? i.e. Python, Java, and .NET
Future readers
Please react with 👍 and your use case to help us understand customer demand.
@svozza can you take this while I work on the docs, so that contributors for other issues we're opening will have the files already split?
Yep, will do!
Warning
This issue is now closed. Please be mindful that future comments are hard for our team to see.
If you need more assistance, please either reopen the issue, or open a new issue referencing this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.
This is now released under v2.26.0 version!