I have the following test.js
file:
const test = require("ava");
test.before("foo", t => {
someSetupThatMightThrow();
});
test("bar", t => {
t.pass();
});
test.after("baz", t => {
someTeardownThatMightThrow();
});
After running ava --verbose
, if any of the hooks throw, I get a red X in the test report, which is great. But if nothing throws, I get only one green checkmark for the bar
test:
I would like to see green checkmarks relative to the before/after hooks as well, instead of them simply being omitted. How can I do this?
We won't output those in our regular reporters, sorry. I'd say don't worry: the hooks will run.
(Eventually down the line maybe we'd have a much more low-level reporter which would include this information, that you could build your own reporter on, but that's a ways away.)