Summary
adds a high-level testing utility to simplify writing integration tests for Kito applications. Currently, testing requires manual context mocking and internal property access, which is verbose and couples tests to implementation details.
Motivation
simplify testing
Proposed Solution
Changes
- Add
request() method to KitoRouter and KitoServer classes
- Create a
TestRequestBuilder that provides a fluent API for constructing test requests
- Support common HTTP methods (GET, POST, PUT, DELETE, PATCH, etc.)
- Support setting headers, query params, body, and cookies
- Return a
TestResponse object with assertions helpers
Testing
- Add unit tests for the
request() method
- Migrate existing integration tests to use the new helper
- Ensure backward compatibility with existing test patterns
Checklist
Summary
adds a high-level testing utility to simplify writing integration tests for Kito applications. Currently, testing requires manual context mocking and internal property access, which is verbose and couples tests to implementation details.
Motivation
simplify testing
Proposed Solution
Changes
request()method toKitoRouterandKitoServerclassesTestRequestBuilderthat provides a fluent API for constructing test requestsTestResponseobject with assertions helpersTesting
request()methodChecklist