Closed RWhite-EDR closed 3 weeks ago
Hey @RWhite-EDR , first of all, thanks for this!
Can you please add a unit test to verify this?
@naorpeled I'm not sure if I can as the context object is almost always present. It is only missing in my unit test of my routes. I've never seen this issue from within API Gateway, ALB, or serverless-offline. Only in my jest-based unit tests.
Hey @RWhite-EDR will make a minor change tomorrow and then release this 🙏
You rock!
Sorry for the delay
Hey @RWhite-EDR, I gave this some more thought and I think that because this isn't a real use case we shouldn't really support it. Sorry for the confusion and thanks for your time.
@naorpeled Rats -- so close. I'm not sure why testing of the main function using Jest isn't a real use case. Maybe I need a better mock, but I can show you where this is failing from my test scripts.
Logger is not handling missing context... https://github.com/jeremydaly/lambda-api/issues/260