Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(gatsby-plugin-page-creator): ensure that __tests__ directory is a…
…ctually ignored (#9720) * fix: ensure that __tests__ directory is actually ignored This (simple) PR fixes a bug I was noticing in #9629, specifically that __tests__/*.js files _were_ being included in the bundle. This is because the isTestFile function in gatsby-plugin-page-creator is passed the file name, not the file name _with_ the folder (__tests__ in this case). I added a second check to check the dir, but could also just implement this check with the raw file path, as well * chore: use back ticks * fix: account for nested directories and switch to micromatch * chore: split to test windows path matching * chore: run linter * chore: add windows path matching test (micromatch supports natively) * fix: pass single string to isMatch, instead of array * Revert "fix: pass single string to isMatch, instead of array" This reverts commit dbc2ffe.
- Loading branch information
Showing
4 changed files
with
48 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters