I'm using v4. I used --experimental-loader, and this causes an error.
What happened
I just get No tests found.
What you expected to happen
When I look in the source:
The worker-failed message just reports it as "no declared tests", but ignores the actual error.
If you enable verbose it says ✖ src/index.test.ava.ts exited due to undefined.
It should print the full error if it doesn't recognize it without even without verbose. Silent errors are really bad.
case 'worker-failed': {
if (fileStats.declaredTests === 0) {
//console.log(event) <---------
this.filesWithoutDeclaredTests.add(event.testFile);
}
if (this.verbose && !this.filesWithMissingAvaImports.has(event.testFile)) {
if (event.nonZeroExitCode) {
this.lineWriter.writeLine(colors.error(`${figures.cross} ${this.relativeFile(event.testFile)} exited with a non-zero exit code: ${event.nonZeroExitCode}`));
} else {
this.lineWriter.writeLine(colors.error(`${figures.cross} ${this.relativeFile(event.testFile)} exited due to ${event.signal}`));
}
}
break;
}
In my case it was a ERR_MODULE_NOT_FOUND message.
And even with verbose, for other errors, it trims the stack trace which is annoying.
Here are some more errors I got afterwards, but without a stack trace is impossible to debug.
Uncaught exception in src/index.test.ava.ts
TypeError: require(...).getRunner is not a function
Uncaught exception in src/index.test.ava.ts
TypeError: Cannot read property 'chalkOptions' of undefined
case 'uncaught-exception': {
this.uncaughtExceptions.push(event);
if (this.verbose) {
this.lineWriter.ensureEmptyLine();
this.lineWriter.writeLine(colors.title(`Uncaught exception in ${this.relativeFile(event.testFile)}`));
this.lineWriter.writeLine();
this.writeErr(event);
console.log(event.stack) <-------- This is the stack which is hidden! Please print it when in verbose mode. Maybe add a `trace` mode!
}
break;
}
Please provide details about:
I'm using v4. I used
--experimental-loader
, and this causes an error.I just get
No tests found
.When I look in the source:
The
worker-failed
message just reports it as "no declared tests", but ignores the actual error.If you enable
verbose
it says✖ src/index.test.ava.ts exited due to undefined
.It should print the full error if it doesn't recognize it without even without
verbose
. Silent errors are really bad.In my case it was a
ERR_MODULE_NOT_FOUND
message.And even with verbose, for other errors, it trims the stack trace which is annoying.
Here are some more errors I got afterwards, but without a stack trace is impossible to debug.
And now I also get internal stack traces: