kudy-tester
For more convenient testing of kudy routes requests.
For example:
;;;; ; ; ; it 'should call correct status code', tester.test new GetPostsRoute, , ;
Parameters:
- route
- Instance of tested route.
- request additional data
- In default request has set only 2 options
method
(from route gettermethod
) andurl
(from route getterfullPath
). You can through this parameter pass other (like headers, authentication etc.)
- In default request has set only 2 options
- test function
- this function should be async or return promise. It will get final response object as first parameter and you can do here all necessary testing stuff.