Skip to content
This repository was archived by the owner on Nov 21, 2025. It is now read-only.

Commit 8e56c6a

Browse files
selbekkrakannimer
authored andcommitted
fix(docz-core): ignore test files (#1259)
This change adds a regex that ignores test files by default.
1 parent 8f8724b commit 8e56c6a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

core/docz-core/src/config/docz.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ export const doczRcBaseConfig = {
2727
],
2828
filterComponents: (files: string[]) =>
2929
files.filter(filepath => {
30+
const isTestFile = /\.(test|spec)\.(js|jsx|ts|tsx)$/.test(filepath);
31+
if (isTestFile) {
32+
return false;
33+
}
3034
const startsWithCapitalLetter = /\/([A-Z]\w*)\.(js|jsx|ts|tsx)$/.test(
3135
filepath
3236
)

0 commit comments

Comments
 (0)