reproduction
import 'package:test/test.dart';
bool runTest = true;
void main() {
_doTest('some test', () async {
int value = await _load();
expect(value, 43);
});
}
void _doTest(String name, Function() callback) {
test(name, () {
if (!runTest) {
print('skipped.');
return;
}
callback();
});
}
Future<int> _load() async {
await Future.delayed(Duration(seconds: 10));
return 42;
}
observed
The tests pass fine.
expected
Tests that aren't finished by the time the process exits should be considered failing.
notes
I actually requested that this failure be fixed at a language level but that approach sounds unlikely to bear fruit: dart-lang/language#4608
reproduction
observed
The tests pass fine.
expected
Tests that aren't finished by the time the process exits should be considered failing.
notes
I actually requested that this failure be fixed at a language level but that approach sounds unlikely to bear fruit: dart-lang/language#4608