Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix Now×
Skip to content
World desk5 min

How to Fix Cypress CI Errors: No Spec Files Found

When Cypress CI finds no specs, verify the project and effective spec selection before changing the exit behavior. Use the no-spec success option only when an empty run is acceptable.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

If Cypress CI reports “No spec files found,” first verify that the job is running the intended Cypress project and configuration. Then check whether the expected test files match the active testing type’s specPattern and survive excludeSpecPattern, --spec, and any runtime filters. Keep the failure when tests should run; use --pass-with-no-tests only when an empty selection is an acceptable result for that job.

What the error means

Cypress found no eligible spec files for the run. It does not necessarily mean the repository contains no tests: Cypress discovers specs according to the project it runs, the active testing type, its configured patterns and exclusions, and any command-line or runtime filters. The error text can vary by Cypress release.

As an Amazon Associate I earn from qualifying purchases.

The key distinction is whether zero specs is unexpected. If CI is meant to execute tests, treat the result as a discovery failure and fix the selection. If a particular workflow intentionally filters out every spec and is allowed to do no testing, configure that job to accept an empty selection.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Check the project directory and configuration first

Cypress looks for its configuration in the current working directory by default. CI may be running from a repository root while the Cypress app lives in a subdirectory, or from a different directory than your local command.

  1. Inspect the CI step’s working directory and exact Cypress command.
  2. Run the command from the directory containing the intended Cypress project, or specify that directory with --project.
  3. Identify the configuration file the run actually uses. Check the CLI arguments as well: Cypress command-line configuration can override values in the config file.

For example, a job targeting a nested app can specify its project directory as follows:

npx cypress run --project ./apps/web

Use the actual path for your repository. If the project selection is wrong, editing a different project’s patterns will not fix the CI run. See Cypress’s CLI reference for --project and command options.

Verify that intended files match the active spec pattern

Compare the real paths and filenames of the tests you expect CI to run with specPattern for the testing type the job is using. Cypress treats this setting as a glob or array of globs; a file outside the configured pattern is not eligible just because it is a test file or because it exists in the repository.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Confirm whether the command runs end-to-end tests or component tests.
  2. Inspect the effective configuration for that testing type’s specPattern.
  3. Compare the pattern with the spec’s actual directory, filename, and extension, including any case or path differences relevant to your environment.
  4. Check excludeSpecPattern for a rule that removes the matching files.

Do not assume a historical default applies to your project. Cypress’s changelog documents specPattern as testing-type-specific and records historical defaults, but effective settings depend on the project’s configuration and Cypress version. Check the Cypress changelog alongside your installed version when the current configuration is unclear.

Check command-line and runtime filters

A --spec argument narrows the candidate set; it does not bypass the configured pattern. Cypress runs files selected by --spec only if they also match specPattern. Check both sides of the selection, as well as any runtime filtering that may intentionally or accidentally remove all candidates.

  • --spec: Confirm the path or glob points to the intended files and is compatible with the active specPattern.
  • Config overrides: Review command-line configuration arguments that may replace values from the project config.
  • Runtime filters: Check any logic that selects, skips, quarantines, or filters specs based on environment or job inputs. Cypress notes that dynamic filtering can produce a zero-file run intentionally.

The Cypress CLI documentation describes the interaction between --spec and specPattern. If a configuration that appears correct behaves differently across releases, compare the installed version with the versioned documentation and changelog; Cypress has made fixes involving filtering and path/glob handling.

Decide whether CI should fail when no specs run

Expected tests should run

Leave Cypress’s default no-spec failure in place. Correct the project directory, effective configuration, pattern, exclusion, or filter so the intended tests are discovered. Making the job green without running its expected tests hides a broken check.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

An empty selection is an accepted outcome

For cypress run, add --pass-with-no-tests when the job is intentionally allowed to select zero specs:

npx cypress run --pass-with-no-tests

Cypress documents this option as exiting successfully when no spec files are found. The option is listed in the current CLI reference; Cypress’s February 25, 2026 article says it starts with Cypress 15.11.0. Verify the installed version and its documentation before using it in an older project. This changes the exit result for the no-spec case, not the selection: it does not make missing tests run. See the Cypress article on no-spec CI failures for the policy distinction.

If you use Cypress Cloud, note that Cypress says no recording begins when no specs are found before recording starts. A successful exit therefore does not mean that a test run was recorded.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshooting by symptom

Symptom Likely cause What to check or change
It works locally but CI finds no specs CI runs from a different working directory, targets a different project, or uses different configuration or CLI overrides. Compare the exact command and working directory. Run from the intended project or set --project; inspect the effective config and command-line values.
The named file exists but --spec selects nothing The file does not also match the active testing type’s specPattern, or an exclusion removes it. Compare the full path and filename against specPattern and excludeSpecPattern. A CLI selection does not override the configured pattern.
Only some CI jobs fail with no specs A job-specific argument or runtime filter may reduce the candidate set to zero. Inspect the failing job’s --spec, environment, and filtering logic; compare them with a job that discovers specs.
The configuration seems correct, but behavior differs by version Filtering or path/glob behavior may have changed in a release. Check the installed Cypress version and compare its documentation and release notes in the changelog.
The job passes after adding --pass-with-no-tests, but tests are absent The flag accepts the empty result; it does not repair discovery. Remove the flag if tests are required, then fix the selection. Retain it only when the workflow policy accepts no specs.

Or skip the browser setup

If the task is to capture a page rather than run Cypress tests, ScreenshotNeo is a website screenshot API and MCP server for developers. A single request returns a PNG, JPEG, WebP, or PDF. For example, save a WebP screenshot with cURL:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

See the ScreenshotNeo API documentation for request options. ScreenshotNeo removes cookie and consent banners, newsletter popups, and chat widgets before capture; bot checks, blank pages, failed loads, timeouts, and cache hits are not billed. Its MCP server provides screenshot and page-information tools for AI agents. The Free plan includes 1,000 shots a month without a card; paid plans start at $5 for 3,000 shots. Sign up for free.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.