D
Deno

help

Testing my Oak `Application` end-to-end

Aabi5/11/2023
I have an Oak application, and I'd like to test the main const app = new Application() configuration, making sure e.g. that all the routes are being found, etc. I've only been able to find createMockContext, etc., but I can't figure out how to make a "mock server request" that would be accepted by Application.handle basically? In fact, I don't know how to create a mock request with a specific string body, even for the mock context which is created by createMockContext...?

Looking for more? Join the community!