Skip to main content

Routed Testing

routed_testing provides convenience wrappers that plug server_testing into Routed engines. It ships helpers like engineTest and prebuilt handler providers so you can focus on test logic instead of wiring.

Install

dev_dependencies:
routed_testing: ^0.4.0

Quick start

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

engineTest('GET /health', (engine, client) async {
engine.get('/health', (ctx) => ctx.string('ok'));
final res = await client.get('/health');
res.assertStatus(200).assertBody('ok');
});

Next steps