exclude
- 类型:
string[] | { patterns: string[]; override?: boolean } - 默认值:
['**/node_modules/**', '**/dist/**', '**/.{idea,git,cache,output,temp}/**'] - CLI:
--exclude "**/fixtures/**"
从测试文件发现阶段排除的 glob 模式列表,相对于 root 解析。Rstest 还会自动排除临时构建输出目录(output.distPath.root,默认为 dist/.rstest-temp)。
示例
排除 fixtures 目录下的测试文件:
覆盖默认值
默认情况下,Rstest 会将自定义规则与默认规则合并。需要替换默认 exclude 规则时,将 override 设为 true:
rstest.config.ts