Closed ghost closed 8 years ago
I was reading your readme, and saw this: https://github.com/ben-page/node-test#event-end but this one isn't triggered after everything else as far as I know. If you trigger that event and add this
console.log('Foo')
you will see that Foo runs multiple times, and after each suite. Not when all suites are completed.
This event: https://github.com/ben-page/node-test#event-start
Isn't working as expected either I guess? With the Foo example
console.log('Foo')
I had expected Foo to be triggered only once before all suites and tests?
This is my output now on top of the reporter with multiple suites
Foo
Foo
Foo
Foo
Foo
Foo
Foo
Foo
Foo
Foo
Foo
Foo
Foo
Foo
Foo
Foo
Foo
Foo
Foo
I figured out what's going on. So ignore this! Closing.
I noticed there are no events to be triggered before all tests are running, and no event to be triggered at the end of all tests and suites?
Example something like this?
With this two new events it will be easier to create custom reporters. Now your reporter code is only inside test-end and rest of the events never used. So what is the purpose with
test start
?If you look at
Mocha
and other reporters, you will also notice they have a pass and, failed event too. And the reporter data is gathered one by one when the events triggered so they avoiding using an iteration loop as you do intest-end
.I think there would be much easier for users if
start
andend
events at least was added.