exclude

  • Type: string[]
  • Default: ['**/node_modules/**', '**/dist/**', '**/.{idea,git,cache,output,temp}/**']

A list of glob patterns that should be excluded from your test files.

Example

Exclude the test files under node_modules:

rstest.config.ts
import { defineConfig } from '@rstest/core';

export default defineConfig({
  include: ['**/*.{test,spec}.?(c|m)[jt]s?(x)'],
  exclude: ['**/node_modules/**'],
});