Skip to content

Commit

Permalink
jest: ignore gatsby built dist and cache-dir dirs
Browse files Browse the repository at this point in the history
  • Loading branch information
pieh committed Jun 22, 2018
1 parent 72f4201 commit c11dc7b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ const glob = require(`glob`)

const pkgs = glob.sync(`./packages/*`).map(p => p.replace(/^\./, `<rootDir>`))

const distDirs = pkgs.map(p => path.join(p, `dist`))
const reGatsby = /gatsby$/
const gatsbyDir = pkgs.find(p => reGatsby.exec(p))
const gatsbyBuildDirs = [`dist`, `cache-dir`].map(dir => path.join(gatsbyDir, dir))
const builtTestsDirs = pkgs.map(p => path.join(p, `__tests__`))

const ignoreDirs = [].concat(distDirs, builtTestsDirs)
const ignoreDirs = [].concat(gatsbyBuildDirs, builtTestsDirs)

module.exports = {
notify: true,
Expand Down

0 comments on commit c11dc7b

Please sign in to comment.