Deno "error: No test modules found" in CI
deno test looks for files matching its test patterns (names ending in _test / .test, or test.*). When nothing matches, it reports "No test modules found" and exits nonzero, which fails the job.
What this error means
The step fails with "error: No test modules found" even though tests exist, because the working directory or include pattern did not match them.
deno
error: No test modules foundCommon causes
Test files do not match the naming pattern
Deno only auto-discovers files like *_test.ts or *.test.ts; other names are not picked up without an explicit path.
The step runs in the wrong directory or excludes the tests
CI runs deno test from a folder with no tests, or a deno.json test exclude filters them out.
How to fix it
Point deno test at the right files
- Name tests with the recognized suffix, or pass the path explicitly.
- Run from the directory that contains the tests.
- Re-run so tests are discovered.
Terminal
deno test tests/Configure test include in deno.json
Declare where tests live so discovery is explicit and consistent in CI.
deno.json
{
"test": {
"include": ["tests/"]
}
}How to prevent it
- Name test files with
_test.ts/.test.tsso they are discovered. - Configure test
includein deno.json for non-standard layouts. - Run deno test from the correct working directory in CI.
Related guides
Deno test nonzero exit (failing tests) in CIFix Deno "deno test" nonzero exit in CI - one or more test cases failed or threw, so deno test exits with a n…
Deno lint failures (deno lint) in CIFix deno lint failures in CI - deno lint reports rule violations that exit non-zero and fail the lint gate.
Deno "deno: command not found" in CI (setup-deno)Fix "deno: command not found" in CI - the runner has no Deno on PATH because the setup-deno step is missing o…