unittest reports wrong result if group setup fails #2933
Labels
area-core-library
SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries.
P1
A high priority bug; for example, a single project is unusable or has many test failures
unittest will happily report "PASS" even if the group setup failed. I know this happens in the html configuration (see example below), not sure if it happens in other configurations.
I expect a failure, but this is the result. Note that only 1/1 tests ran:
PASS
1 PASS Expectation: Color first.
All 1 tests passed
Here's the code:
library('bug_example');
import('../dart/dart/lib/unittest/html_config.dart');
import('../dart/dart/lib/unittest/unittest.dart');
main() {
useHtmlConfiguration();
group('Color', () {
test('first', () {
Expect.isTrue(true);
});
throw new Exception('foobar');
test('second', () {
Expect.isTrue(true);
});
});
}
The text was updated successfully, but these errors were encountered: