Hi all, some questions on https://serverless-stack.com/chapters/unit-tests-in-serverless.html
So it looks like the testing is
1. stack testing
2. unit testing the utils
How do you all test cognito custom handlers E.G
postConfirmation: {
handler: "services/cognito/postConfirmation.main",
and custom HTTP API functions E.G
routes: {
"GET /profile": {
authorizer: "iam",
function: {
handler: "services/profile/get.main"
f
Frank
06/05/2022, 8:49 PM
Hey @Kristian Lake, just to throw something out here. In your integration tests, u can programmatically create a user, confirm it, wait up to X seconds, and check if the function has been run.
k
Kristian Lake
06/05/2022, 8:52 PM
Thanks Frank. I guess endpoint testing and reading the responses is the tests to perform - testing for valid/invalid inputs and testing security (permissions)