routed_testing 0.1.0 copy "routed_testing: ^0.1.0" to clipboard
routed_testing: ^0.1.0 copied to clipboard

Routed-specific testing utilities that extend server_testing for integration tests.

example/example.dart

import 'package:routed/routed.dart';
import 'package:routed_testing/routed_testing.dart';
import 'package:server_testing/server_testing.dart';

Future<void> main() async {
  Engine engine = Engine()
    ..get("/hell", (c) {
      c.string("world");
    });

  final handler = RoutedRequestHandler(engine);
  serverTest('GET /hello returns world', (client, h) async {
    final response = await client.get('/hello');
    response.assertStatus(200).assertBodyContains("world");
  }, handler: handler);
}
0
likes
140
points
311
downloads

Publisher

unverified uploader

Weekly Downloads

Routed-specific testing utilities that extend server_testing for integration tests.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

meta, routed, server_testing, test

More

Packages that depend on routed_testing