File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -297,11 +297,11 @@ your text fixtures into the structures, and call your handler directly:
297297#[test]
298298fn test_my_lambda_handler() {
299299 let input = serde_json::from_str("{\"command\": \"Say Hi!\"}").expect("failed to parse event");
300- let context = lambda_runtime::types:: Context::default();
300+ let context = lambda_runtime::Context::default();
301301
302- let event = lambda_runtime::types:: LambdaEvent::new(input, context);
302+ let event = lambda_runtime::LambdaEvent::new(input, context);
303303
304- my_lambda_handler(event).expect("failed to handle event");
304+ my_lambda_handler(event).await. expect("failed to handle event");
305305}
306306```
307307
@@ -316,7 +316,7 @@ fn test_my_lambda_handler() {
316316 let request = lambda_http::request::from_str(input)
317317 .expect("failed to create request");
318318
319- let response = my_lambda_handler(request).expect("failed to handle request");
319+ let response = my_lambda_handler(request).await. expect("failed to handle request");
320320}
321321```
322322
You can’t perform that action at this time.
0 commit comments