TestEvent.testDone constructor

TestEvent.testDone({
  1. required int time,
  2. required int testID,
  3. required bool hidden,
  4. required bool skipped,
  5. required TestDoneStatus result,
})

An event emitted when a test completes.

If the test encountered an error, the TestDoneEvent will be emitted after the corresponding ErrorEvent.

The hidden attribute indicates that the test's result should be hidden and not counted towards the total number of tests run for the suite. This is true for virtual tests created for loading test suites, setUpAll(), and tearDownAll(). Only successful tests will be hidden.

Note that it's possible for a test to encounter an error after completing. In that case, it should be considered to have failed, but no additional TestDoneEvent will be emitted. If a previously-hidden test encounters an error after completing, it should be made visible.

Implementation

factory TestEvent.testDone({
  required int time,
  required int testID,
  required bool hidden,
  required bool skipped,
  required TestDoneStatus result,
}) = TestEventTestDone;