-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
Description
Currently, if anything in the test's dependency tree is missing, AVA gives a message "no tests found in ":
Let's make this message more meaningful!
From a user's perspective, it's very frustrating because one has to manually go through all dependencies and often it's a typing error or wrong way the API is consumed which makes it even harder to spot what's missing. ESLint plugins like no-unresolved don't help either. It's very easy to mis-wire the own API and not to trigger ESLint.
When such error happens, there must be a real error message somewhere deep, probably it is just not "piped through" to the end-user though AVA's innards. Maybe it's esm
or between the AVA and its dependencies?
Often people encounter this like in #1903 and Support here helps to pinpoint the missing dependency but we should do something at the higher level to make the messages more meaningful so that users could help themselves. And save everybody's time.
Test Source
Make a dependency not to be resolved one way or another.
test file:
import test from "ava";
import {something} from "package1";
test("01", t => {
t.pass("just pass");
})
just make it so that "package1" does not export "something", and you'll get this error "no tests found in ".
Config
I'm using esm
and my sources are in ES modules, if it matters.
From package.json:
"ava": {
"cache": false,
"compileEnhancements": false,
"require": [
"esm"
],
"timeout": "99m",
"verbose": true
},
"esm": {
"await": true,
"cjs": true
},
Environment
MacOS and ava 2.4.0