testServer function

  1. @isTest
void testServer(
  1. String description,
  2. FutureOr<void> callback(
    1. ServerTester tester
    ), {
  3. bool? skip,
  4. Timeout? timeout,
  5. dynamic tags,
})

Implementation

@isTest
void testServer(
  String description,
  FutureOr<void> Function(ServerTester tester) callback, {
  bool? skip,
  Timeout? timeout,
  dynamic tags,
}) {
  test(
    description,
    () async {
      var tester = ServerTester._();
      tester._start();
      await callback(tester);
    },
    skip: skip,
    timeout: timeout,
    tags: tags,
  );
}