Skip to content
This repository has been archived by the owner on Jan 24, 2025. It is now read-only.

Commit

Permalink
fix(docz-core): ignore test files (#1259)
Browse files Browse the repository at this point in the history
This change adds a regex that ignores test files by default.
  • Loading branch information
selbekk authored and rakannimer committed Nov 15, 2019
1 parent 8f8724b commit 8e56c6a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/docz-core/src/config/docz.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ export const doczRcBaseConfig = {
],
filterComponents: (files: string[]) =>
files.filter(filepath => {
const isTestFile = /\.(test|spec)\.(js|jsx|ts|tsx)$/.test(filepath);
if (isTestFile) {
return false;
}
const startsWithCapitalLetter = /\/([A-Z]\w*)\.(js|jsx|ts|tsx)$/.test(
filepath
)
Expand Down

0 comments on commit 8e56c6a

Please sign in to comment.