diff --git a/core/docz-core/src/config/docz.ts b/core/docz-core/src/config/docz.ts index 5f36bc987..14f44e605 100644 --- a/core/docz-core/src/config/docz.ts +++ b/core/docz-core/src/config/docz.ts @@ -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 )