Comments (1)
This works for me on both stable
and master
.
// test.dart
import "package:unittest/unittest.dart";
void main() {
tearDown(() => print("in tearDown"));
test("test", () => throw 'oh no');
}
On stable
:
$ dart test.dart
unittest-suite-wait-for-done
in tearDown
ERROR: test
Test failed: Caught oh no
test.dart 5:22 main.<fn>
package:unittest/src/internal_test_case.dart 120:37 run.<fn>
dart:async/zone.dart 902 _rootRunUnary
dart:async/zone.dart 804 _CustomZone.runUnary
dart:async/future_impl.dart 484 _Future._propagateToListeners.handleValueCallback
dart:async/future_impl.dart 567 _Future._propagateToListeners
dart:async/future_impl.dart 358 _Future._completeWithValue
dart:async/future_impl.dart 412 _Future._asyncComplete.<fn>
dart:async/zone.dart 895 _rootRun
dart:async/zone.dart 796 _CustomZone.run
dart:async/zone.dart 704 _CustomZone.runGuarded
dart:async/zone.dart 729 _CustomZone.bindCallback.<fn>
dart:async/schedule_microtask.dart 41 _asyncRunCallbackLoop
dart:async/schedule_microtask.dart 48 _asyncRunCallback
dart:isolate-patch/isolate_patch.dart 96 _runPendingImmediateCallback
dart:isolate-patch/isolate_patch.dart 143 _RawReceivePortImpl._handleMessage
0 PASSED, 0 FAILED, 1 ERRORS
Unhandled exception:
Exception: Some tests failed.
#0 SimpleConfiguration.onDone (package:unittest/src/simple_configuration.dart:197:9)
#1 _completeTests (package:unittest/unittest.dart:370:16)
#2 _runTest (package:unittest/unittest.dart:310:19)
#3 _nextTestCase (package:unittest/unittest.dart:258:11)
#4 _asyncRunCallbackLoop (dart:async/schedule_microtask.dart:41)
#5 _asyncRunCallback (dart:async/schedule_microtask.dart:48)
#6 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:96)
#7 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:143)
On master
:
$ dart test.dart
00:00 +0 -1: test
oh no
test.dart 5:22 main.<fn>
in tearDown
00:00 +0 -1: Some tests failed.
from test.
Related Issues (20)
- [checks] Expectations that return futures do not play well with the unawaited_futures lint HOT 2
- Uneven sharding problem when a test file has only a few tests HOT 2
- VM platform fails to compile tests under `lib` HOT 9
- Move dart2wasm support to be "normal"
- Clean up the `isJS` and `isWasm` booleans from the Runtime wire format HOT 1
- Exe test of stdout/stderr is flaky on windows
- `dart test` failed tests could be on `stderr` HOT 8
- New `--set-exit-if-fail` option HOT 7
- `expect(future, matcher)` has an unhelpful stacktrace
- Release `package:checks` version compatible with test_api 0.7.0 (or greater) HOT 1
- IsNotA
- The coverage output json files are not placed in specified directory HOT 1
- Concurrency didn't work in single file with multiple tests HOT 8
- package:file can give not working verison HOT 6
- Windows CI Test Error: An escape sequence starting with '\u' must be followed by 4 hexadecimal digits. HOT 4
- Support for static diagnostic tests for macros HOT 5
- Replace broken Observatory URL with DevTools URL HOT 10
- test/README.md has broken link in ToC to "Stream matchers"
- Make checks: 0.2.X compatible with Flutter 3.20 HOT 1
- Firefox fails to start when called via `/Applications/Firefox.app/Contents/MacOS/firefox-bin` on macOS
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from test.