Skip to content

Commit

Permalink
fix(parse): ignore ^.git by default
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeed committed Nov 1, 2021
1 parent 43c81a4 commit ff50a71
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ This will traverse the `packages` directory, looking at files and subdirectories

***Ignoring***

Files inside _any_ `node_modules` directory are _always_ ignored.
Any file or directory names matching `node_modules` or `^.git` are _always_ ignored.

You can use the `-i/--ignore` flags to provide additional patterns to ignore. Much like `[pattern]`, these values are cast to a `RegExp`, allowing you to be as vague or specific as you need to be.

Expand Down
2 changes: 1 addition & 1 deletion src/parse.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export async function parse(dir, pattern, opts = {}) {

let suites = [];
let requires = [].concat(opts.require || []).filter(Boolean);
let ignores = ['node_modules'].concat(opts.ignore || []).map(toRegex);
let ignores = ['^.git', 'node_modules'].concat(opts.ignore || []).map(toRegex);

requires.forEach(name => {
let tmp = exists(name);
Expand Down

0 comments on commit ff50a71

Please sign in to comment.