Dart
#
Versions- 2.8
#
Test FrameworksTests are written just like how you'd write outside of Codewars.
The solution belongs to a package named solution
. So it can be imported from package:solution/solution.dart
and the optional preloaded code provided by the kata author can be imported from package:solution/preloaded.dart
.
Example:
int add(int a, int b) {
return a + b;
}
import "package:test/test.dart";
import "package:solution/solution.dart";
void main() {
group("Example", () {
test("add", () {
expect(add(1, 1), equals(2));
});
});
}
See test
's documentation for how to write tests.
#
Timeout12 seconds
#
PackagesNone
#
ServicesNone
#
Language IDdart