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