Closed rauschma closed 4 years ago
Yea that's pretty bizarre. It should work the same as without --match
, regardless of the -v
flag.
To reproduce this, I had to run with npx ava ./exercises/strings/remove_extension_test.mjs -m removeExtension
(note the additional -m removeExtension
option), which I guess is missing in the instructions above?
There is an early return in the block at https://github.com/avajs/ava/blob/master/lib/reporters/mini.js#L382, which prevents further error details from being output when running without -v
flag.
if (this.matching && this.stats.selectedTests === 0) {
this.lineWriter.writeLine(colors.error(`${figures.cross} Couldn't find any matching tests`));
this.lineWriter.writeLine();
return;
}
Maybe that could be moved further down the method, but I don't know how that will affect output for other cases.
To reproduce this, I had to run with
npx ava ./exercises/strings/remove_extension_test.mjs -m removeExtension
(note the additional-m removeExtension
option), which I guess is missing in the instructions above?
In the reproduction, it's in AVA's configuration, not on the CLI.
Maybe that could be moved further down the method, but I don't know how that will affect output for other cases.
Yea we have a bunch of reporter issues. I think they're more fundamental than can be addressed in individual tickets. Will write up a larger issue instead.
@vmlf01 thanks for finding the root cause though!
@vmlf01 Ah, sorry, the latest version already contains the workaround. I’ve updated the installation instructions. Now they simply remove the workaround.
Both due to the age of this issue, and the state of our reporters, I've decided to roll this into #2501.
Steps to reproduce (AVA: 2.2.0, macOS Mojave, Node.js 12.6):
package.json
and remove--verbose
:"test": "ava --verbose --match \"!*#bonus\"",
"test": "ava --match \"!*#bonus\"",
npm install
npm t installation_test.mjs
[works properly]Interaction 1: bug (error output is hidden)
Interaction 2: desired output