internalBootstrapNodeTest function

void internalBootstrapNodeTest(
  1. Function getMain()
)

Bootstraps a browser test to communicate with the test runner.

Implementation

void internalBootstrapNodeTest(Function Function() getMain) {
  var channel = serializeSuite(getMain, beforeLoad: (suiteChannel) async {
    var serialized = await suiteChannel('test.node.mapper').stream.first;
    if (serialized is! Map) return;
    setStackTraceMapper(JSStackTraceMapper.deserialize(serialized)!);
  });
  socketChannel().then((socket) => socket.pipe(channel));
}