dart compare list with test expect code example
Example 1: dart test expect assert fail
import 'package:test/test.dart';
void main() {
test('assert throws assert', () {
expect(() {
assert(false);
}, throwsA(isA<AssertionError>());
});
}
Example 2: dart list equality
Function eq = const ListEquality().equals;
print(eq([1,'two',3], [1,'two',3])); // => true