{"record":{"id":"93a97b6fa803fbba","repo":"angular/angular-cli","slug":"no-files-ending-with-filesuffix-found-in-se","errorCode":null,"errorMessage":"No files ending with '${fileSuffix}' found in ${searchScope}.","messagePattern":"No files ending with '(.+?)' found in (.+?)\\.","errorType":"exception","errorClass":"SchematicsException","httpStatus":null,"severity":"error","filePath":"packages/schematics/angular/refactor/jasmine-vitest/index.ts","lineNumber":114,"sourceCode":"      // Approximation of a directory exists check\n      if (dirEntry && (dirEntry.subdirs.length > 0 || dirEntry.subfiles.length > 0)) {\n        // It is a directory\n        files = findTestFiles(dirEntry, fileSuffix);\n      } else if (tree.exists(includePath)) {\n        // It is a file\n        files = [includePath];\n      } else {\n        throw new SchematicsException(\n          `The specified include path '${options.include}' does not exist.`,\n        );\n      }\n    } else {\n      searchScope = `project '${projectName}'`;\n      files = findTestFiles(tree.getDir(projectRoot), fileSuffix);\n    }\n\n    if (files.length === 0) {\n      throw new SchematicsException(\n        `No files ending with '${fileSuffix}' found in ${searchScope}.`,\n      );\n    }\n\n    for (const file of files) {\n      reporter.incrementScannedFiles();\n      const content = tree.readText(file);\n      const newContent = transformJasmineToVitest(file, content, reporter, {\n        addImports: !!options.addImports,\n        browserMode: !!options.browserMode,\n        fakeAsync: !!options.fakeAsync,\n      });\n\n      if (content !== newContent) {\n        tree.overwrite(file, newContent);\n        reporter.incrementTransformedFiles();\n      }\n    }","sourceCodeStart":96,"sourceCodeEnd":132,"githubUrl":"https://github.com/angular/angular-cli/blob/bb72145f9ab45aee29f523236b3a25cd0813a841/packages/schematics/angular/refactor/jasmine-vitest/index.ts#L96-L132","documentation":"Thrown by the jasmine-vitest refactor after collecting candidate test files when the resulting list is empty. It reports which scope was searched (the explicit include path or the project root) and the required file suffix (default .spec.ts), so the developer knows what was not found.","triggerScenarios":"Running the refactor when findTestFiles returns zero files — the --include directory contains no files with the given suffix, or the project directory contains no *.spec.ts (or custom --suffix) files.","commonSituations":"Projects whose tests use .test.ts naming while the tool expects .spec.ts; tests already migrated to Vitest; include directory pointing at source without specs; misconfigured test file naming conventions.","solutions":["Verify test files exist and match the suffix; pass --suffix=test.ts if your files are *.test.ts.","Rename spec files to end with the expected suffix (e.g. .spec.ts).","Point --include at the directory that actually contains the test files.","Omit --include to scan the entire project root."],"exampleFix":"// before\nng ref jasmine-vitest --suffix=spec.ts\n// after\nng ref jasmine-vitest --suffix=.spec.ts --include src/app","handlingStrategy":"validation","validationCode":"const specs = glob.sync(`**/*${suffix}`, { cwd: projectRoot, ignore: ['node_modules/**'] });\nif (specs.length === 0) {\n  throw new Error(`No files ending '${suffix}' under ${projectRoot}; nothing to migrate.`);\n}","typeGuard":null,"tryCatchPattern":"try {\n  await runJasmineVitestRefactor(opts);\n} catch (e) {\n  if (String(e.message).includes('No files ending')) {\n    console.error('Check the file suffix (pass --suffix) and the include scope.');\n  } else throw e;\n}","preventionTips":["Match your test suffix convention (.spec.ts vs .test.ts) via --suffix","Confirm specs exist under the resolved project root","Point --include at directories that actually contain tests","Skip the migration for projects already on Vitest"],"tags":["angular","schematics","no-files-found","testing"],"backgroundTag":"no-test-files-found","analyzedSha":"bb72145f9ab45aee29f523236b3a25cd0813a841","analyzedAt":"2026-08-30T02:47:34.745Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}