nyFailing function

void nyFailing(
  1. String description,
  2. Future<void> callback()
)

Mark a test as expected to fail.

Implementation

void nyFailing(String description, Future<void> Function() callback) {
  test(description, () async {
    try {
      await callback();
      fail('Expected test to fail but it passed');
    } catch (e) {
      // Expected to fail
    }
  });
}