testBrowser function
Implementation
@isTest
void testBrowser(
String description,
FutureOr<void> Function(BrowserTester tester) callback, {
String location = '/',
bool? skip,
Timeout? timeout,
dynamic tags,
}) {
test(
description,
() async {
if (web.window.location.pathname != location) {
web.window.history.replaceState(null, 'Test', location);
}
var binding = BrowserAppBinding();
var tester = BrowserTester._(binding);
await binding.runTest(() async {
await callback(tester);
});
// Clear all nodes
web.document.body?.replaceChildren([].jsify()!);
},
skip: skip,
timeout: timeout,
tags: tags,
);
}