internalBootstrapBrowserTest function
Bootstraps a browser test to communicate with the test runner.
Implementation
void internalBootstrapBrowserTest(Function Function() getMain,
{StreamChannel<Object?>? testChannel}) {
var channel = serializeSuite(getMain, hidePrints: false,
beforeLoad: (suiteChannel) async {
var serialized = await suiteChannel('test.browser.mapper').stream.first;
if (serialized is! Map) return;
setStackTraceMapper(JSStackTraceMapper.deserialize(serialized)!);
});
(testChannel ?? postMessageChannel()).pipe(channel);
}