Skip to content

Commit

Permalink
Use test example from JS
Browse files Browse the repository at this point in the history
  • Loading branch information
Cawllec committed Feb 19, 2025
1 parent 9b966ba commit 1c07118
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
exports.lambdaHandler = async (event, context) => {
throw new Error('this is an error')
exports.lambdaHandler = (event, context, callback) => {
throw new Error('Oh no!')
}

2 changes: 1 addition & 1 deletion test/e2e/aws-sam/features/invoke.feature
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ Scenario: Executing a lambda function that fails with no internal errors

Scenario: Executing a lambda function that fails with an internal error
Given I invoke the "ThrownErrorFunction" lambda in "features/fixtures/node-app"
Then the lambda response "errorMessage" contains "this is an error"
Then the lambda response "errorMessage" contains "Oh no!"
And the lambda response "errorType" equals "Error"
And the lambda response "body" is null
And the SAM exit code equals 0

0 comments on commit 1c07118

Please sign in to comment.