Loading...
Loading...
Enforce best practices for Dart and Flutter testing.
npx skill4agent add kevmoo/dash_skills test-best-practicesdart test.lengthgrep -r "\.length,\s*equals\(" test/grep -rE "expect\(.*\.(is(Empty|NotEmpty)),\s*(isTrue|true|isFalse|false)" test/grep -r "for (var .* in .*)" test/hasLengthexpect(list, hasLength(n))expect(list.length, n)IterableMapStringisEmptyisNotEmptyexpect(list, isEmpty)expect(list.isEmpty, true)expect(list, isNotEmpty)expect(list.isNotEmpty, true)expect(list, isNot(isEmpty))IterableMapStringexpect(list, everyElement(matcher))expect(actualList, expectedList)package:testcontainsPairexpect(map, containsPair(key, value))expect(map[key], value)expect(map, isNot(contains(key)))expect(map, {'k': 'v'})containsPairexpect(obj, isA<T>())expect(obj is T, isTrue)havingisA<T>expect(obj, isA<MyType>()
.having((o) => o.prop1, 'prop1', a)
.having((o) => o.prop2, 'prop2', b));IterableMapPriorityQueue.lengthIterablepackage:test