Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -297,11 +297,11 @@ your text fixtures into the structures, and call your handler directly:
#[test]
fn test_my_lambda_handler() {
let input = serde_json::from_str("{\"command\": \"Say Hi!\"}").expect("failed to parse event");
let context = lambda_runtime::types::Context::default();
let context = lambda_runtime::Context::default();

let event = lambda_runtime::types::LambdaEvent::new(input, context);
let event = lambda_runtime::LambdaEvent::new(input, context);

my_lambda_handler(event).expect("failed to handle event");
my_lambda_handler(event).await.expect("failed to handle event");
}
```

Expand All @@ -316,7 +316,7 @@ fn test_my_lambda_handler() {
let request = lambda_http::request::from_str(input)
.expect("failed to create request");

let response = my_lambda_handler(request).expect("failed to handle request");
let response = my_lambda_handler(request).await.expect("failed to handle request");
}
```

Expand Down