tes panah mengharapkan tegas gagal

import 'package:test/test.dart';

void main() {
  test('assert throws assert', () {
    expect(() {
      assert(false);
    }, throwsA(isA<AssertionError>());
  });
}
Naughty Nightingale