For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt, and this page is available as Markdown at /config/test/setup-files.md.
close
  • English
  • setupFiles

    • Type: string[]
    • Default: []

    A list of paths to modules that run some code to configure or set up the testing environment, they will be run before each test file.

    rstest.config.ts
    import { defineConfig } from '@rstest/core';
    
    export default defineConfig({
      setupFiles: ['./scripts/rstest.setup.ts'],
    });