expectRouteInHistory function
Assert that the route history contains a specific route.
Implementation
void expectRouteInHistory(String route) {
final List<dynamic> history = Nylo.getRouteHistory();
final List<dynamic> routeNames = history.map((r) => r['name']).toList();
expect(
routeNames,
contains(route),
reason: 'Expected route "$route" in history but found: $routeNames',
);
}