Skip to content

Commit

Permalink
Fix findMatchingTests for directories (jestjs#2671)
Browse files Browse the repository at this point in the history
  • Loading branch information
rogeliog authored and cpojer committed Jan 23, 2017
1 parent ff29016 commit 285e04d
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions packages/jest-cli/src/SearchSource.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ const DependencyResolver = require('jest-resolve-dependencies');

const chalk = require('chalk');
const changedFiles = require('jest-changed-files');
const fileExists = require('jest-file-exists');
const path = require('path');
const {
escapePathForRegex,
Expand Down Expand Up @@ -162,13 +161,6 @@ class SearchSource {
findMatchingTests(
testPathPattern: StrOrRegExpPattern,
): SearchResult {
if (testPathPattern && !(testPathPattern instanceof RegExp)) {
const maybeFile = path.resolve(process.cwd(), testPathPattern);
if (fileExists(maybeFile, this._hasteContext.hasteFS)) {
return this._filterTestPathsWithStats([maybeFile]);
}
}

return this._getAllTestPaths(testPathPattern);
}

Expand Down

0 comments on commit 285e04d

Please sign in to comment.