testing/helpers library
Testing helpers for Chase framework.
Provides convenient helpers for building test requests and assertions.
Example:
import 'package:chase/testing/testing.dart';
test('authenticated request', () async {
final res = await client.get(
'/protected',
headers: AuthHelper.bearer('my-token'),
);
expect(res.status, 200);
});
Classes
- AuthHelper
- Helpers for authentication in tests.
- RequestHelper
- Helpers for building test requests.
- ResponseExpect
- Fluent assertion builder for TestResponse.
Extensions
- CookieTestingExtension on TestResponse
- Extension on TestResponse for cookie testing.
- FluentAssertions on TestResponse
- Extension on TestResponse for fluent assertions.
- TestClientExtensions on TestClient
- Extension on TestClient for common patterns.
Exceptions / Errors
- ChaseTestFailure
- Exception thrown when a test assertion fails.