AVA "Couldn’t find any files to test" in CI
AVA scanned for test files using its files patterns and found none, so it exits with an error. Your filenames do not match AVA’s expected patterns, or CI runs where no tests live.
What this error means
AVA aborts with "Couldn’t find any files to test." Locally you may run a file by path and it passes, masking that the default/files glob matches nothing in CI.
✖ Couldn't find any files to test
See https://github.com/avajs/ava for configuring AVA's "files".Common causes
Filenames do not match AVA patterns
AVA picks up test.js, *.test.js, and files under test//tests/ by default. Files named *.spec.ts or in another folder need an explicit files glob.
Wrong working directory or missing TS setup
Running from the wrong directory, or testing TypeScript without the @ava/typescript config, leaves AVA with nothing to match.
How to fix it
Configure a files glob that matches your tests
// package.json
"ava": {
"files": ["src/**/*.spec.ts"],
"extensions": { "ts": "module" },
"nodeArguments": ["--import=tsx"]
}Run from the project root
- Confirm CI invokes AVA from where the
filesglob resolves. - Match the glob to your naming (
*.test.tsvs*.spec.ts). - For TypeScript, configure
@ava/typescriptor a loader so AVA can run.ts.
How to prevent it
- Set an explicit
filesglob in the AVA config. - Keep filenames consistent with the configured pattern.
- Configure TS support so
.tstests are discoverable.