Alexander Arendar
Alexander Arendar

Reputation: 3435

How to print info messages in dart:test?

When writing tests with dart:test how to print info messages such that they appear interleaved with tests output? If I use print then it prints in the end, after all tests output.

Looking for analog of info() in ScalaTest.

Upvotes: 0

Views: 488

Answers (1)

Alexander Arendar
Alexander Arendar

Reputation: 3435

After clarification with guys from the dart:test dev team it looks like regular print can be used. You just need to pass the --reporter=expanded argument when running

pub run test test/shimlaw_tests_test.dart --reporter=expanded

By default a compact single-line reporter is used which places output of print in the end of the test runner output. While the expanded reporter prints appropriately.

Upvotes: 1

Related Questions