Jasmine "No specs found" - Spec Glob & helpers in CI
Jasmine ran but its spec_dir/spec_files configuration matched no files, so it reports "No specs found" and exits. Usually the glob does not match your filenames or CI runs from the wrong directory.
What this error means
Jasmine finishes instantly with "No specs found" and zero tests. The exit status may even be success, silently hiding that nothing was actually verified in CI.
Randomized with seed 12345
No specs found
Finished in 0.001 secondsCommon causes
spec_files glob matches nothing
Jasmine resolves spec_files relative to spec_dir. If your tests are not under that directory, or do not match the suffix (default *[sS]pec.js), none are found.
Wrong working directory in CI
Running jasmine from a directory where the configured spec_dir resolves to no files yields an empty run.
How to fix it
Point spec_dir/spec_files at your tests
// spec/support/jasmine.json
{
"spec_dir": "spec",
"spec_files": ["**/*[sS]pec.js"],
"helpers": ["helpers/**/*.js"]
}Run from the right place and verify discovery
- Confirm CI runs Jasmine from the project root so
spec_dirresolves. - Match the
spec_filessuffix to your filenames (*.spec.jsvs*Spec.js). - Fail the build if zero specs run, so an empty discovery is not a silent pass.
How to prevent it
- Commit an explicit
spec_filesglob instead of relying on defaults. - Add a guard that fails CI when zero specs execute.
- Keep the spec suffix convention consistent across the repo.