benansell / lobo

Elm test runner
BSD 3-Clause "New" or "Revised" License
23 stars 0 forks source link

Collect output for each test #15

Closed pbiggar closed 7 years ago

pbiggar commented 7 years ago

When tests fail, it would be great to see the output for the test printed out in the summary. Perhaps an option like --showTodo and --showSkip (which are why we moved to lobo).

benansell commented 7 years ago

@pbiggar are you thinking of an option that produces an output similar to --showTodo / --showSkip but for failing tests but then also prints out the full details after the list of failing tests?

For example something like the following:

lobo 15-example
pbiggar commented 7 years ago

Yeah, similar to that. So for example, if test 3 had any Debug.log output, it would print it at the bottom of that screenshot, either before or after the Expectation info.

benansell commented 7 years ago

Ok, so how about keeping the original summary, but capturing all the Debug.log statements for a test and not reporting them until after the after the expectation like this:

lobo 14-example-2

where in the above example the log statements are: : foo bar : baz

and : qux

pbiggar commented 7 years ago

Yes, this would be perfect.

Note that we've switched back to elm-test after a brief trial of lobo, so we're not blocked by this (though I think this would have been a good reason to stay).

benansell commented 7 years ago

This is now available via npm in lobo v0.4.0