Skip to content

Commit

Permalink
feat: added option to ignore test paths via config (#123)
Browse files Browse the repository at this point in the history
## Details
This change allows ignore patterns to be specified in the config file.  When patterns are specified, any benchmark file or folder that matches will be excluded from running the test.

## Does this PR introduce a breaking change?

* [ ] Yes
* [X] No
  • Loading branch information
Dinko Bajric authored and diervo committed Sep 18, 2018
1 parent ecef58e commit d9d61a9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/best-cli/src/run_best.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ const IGNORE_PATHS = [
async function getBenchmarkPaths({ rootDir }, config) {
const { testMatch, rootDir: projectRoot } = config;
const cwd = projectRoot || rootDir;
const results = await globby(testMatch, { cwd, ignore: IGNORE_PATHS });
const ignorePaths = IGNORE_PATHS.concat(config.testPathIgnorePatterns || []);
const results = await globby(testMatch, { cwd, ignore: ignorePaths });
return results.map(p => path.resolve(cwd, p));
}

Expand Down

0 comments on commit d9d61a9

Please sign in to comment.