nyTest function

void nyTest(
  1. String description,
  2. Future<void> callback(), {
  3. bool skip = false,
  4. dynamic tags,
  5. Timeout? timeout,
})

Pest-style test wrapper for Nylo tests.

Provides a clean syntax for writing tests:

nyTest('user can register', () async {
  // test code
});

Implementation

void nyTest(
  String description,
  Future<void> Function() callback, {
  bool skip = false,
  dynamic tags,
  Timeout? timeout,
}) {
  test(
    description,
    () async {
      await callback();
    },
    skip: skip,
    tags: tags,
    timeout: timeout,
  );
}