This updates our dependencies. I was also recently made aware of Node's support for custom reporters thanks to rluvaton, which was not available when I first began working on the extension. This moves over to them and makes a bunch of assorted fixes found on the way. Some notable ones:
We now use pretty-format, the same library used in Jest, to format objects for diff comparison.
Console output is no longer associated with specific test cases. This is not possible to do with current APIs, since the test reporters always get events asynchronously, so a test may not even be 'started' when we intercept a console.log. We did some best effort stuff here before, but it was very poor.
(It would be better to use async_hooks to handle tests running in parallel, but there's (perhaps rightly) not a point in which we can wrap test methods to do that without trying to money-patch modules.)
There's a new nodejs-testing.verbose config option folks can use to get raw reporter information in the Test Results output to aid in issue reporting.
The test runner might be a bit more speedy since our worker no longer imports the large tap module.
I fixed an issue that may have resulted in test cases not reporting results in spite of correct console output.
You can now choose between a couple of different simple output styles for the Test Results console using the nodejs-testing.style config option.
This updates our dependencies. I was also recently made aware of Node's support for custom reporters thanks to rluvaton, which was not available when I first began working on the extension. This moves over to them and makes a bunch of assorted fixes found on the way. Some notable ones:
We now use
pretty-format
, the same library used in Jest, to format objects for diff comparison.Console output is no longer associated with specific test cases. This is not possible to do with current APIs, since the test reporters always get events asynchronously, so a test may not even be 'started' when we intercept a
console.log
. We did some best effort stuff here before, but it was very poor.(It would be better to use async_hooks to handle tests running in parallel, but there's (perhaps rightly) not a point in which we can wrap test methods to do that without trying to money-patch modules.)
There's a new
nodejs-testing.verbose
config option folks can use to get raw reporter information in the Test Results output to aid in issue reporting.The test runner might be a bit more speedy since our worker no longer imports the large
tap
module.I fixed an issue that may have resulted in test cases not reporting results in spite of correct console output.
You can now choose between a couple of different simple output styles for the Test Results console using the
nodejs-testing.style
config option.cc @rluvaton