Giter Club home page Giter Club logo

Comments (1)

nex3 avatar nex3 commented on July 22, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.