import { TestProject } from "vitest/node"; /** * Global setup function for initializing test fixtures. * * Copies fixtures from the bundled location to a temp directory * and installs dependencies. * * Note: Fixtures are NOT built during setup. Tests that need built * fixtures should build them as part of the test. * * This function is designed to be used with vitest globalSetup. * * @public * * @param options - Configuration options * @example * ```typescript * // In vitest.config.ts * export default defineConfig({ * test: { * globalSetup: ['@sanity/cli-test/vitest'] * } * }) * ``` */ export declare function setup( _: TestProject, options?: SetupTestFixturesOptions, ): Promise; /** * Options for setupTestFixtures * * @public */ export declare interface SetupTestFixturesOptions { /** * Glob patterns for additional fixture directories to set up. * * Each pattern is matched against directories in the current working directory. * Only directories containing a `package.json` file are included. * * @example * ```typescript * ['fixtures/*', 'dev/*'] * ``` */ additionalFixtures?: string[]; /** * When true, passes `--ignore-workspace` to pnpm install so fixtures get * their own node_modules even when the temp directory is inside a pnpm * workspace. Required for E2E tests that spawn the CLI binary against * fixture directories. */ ignoreWorkspace?: boolean; /** * Custom temp directory path. Defaults to process.cwd()/tmp */ tempDir?: string; } /** * Teardown function to clean up test fixtures. * * Removes the temp directory created by setupTestFixtures. * * This function is designed to be used with vitest globalSetup. * * @public * * @param options - Configuration options */ export declare function teardown( options?: TeardownTestFixturesOptions, ): Promise; /** * Options for teardownTestFixtures * * @public */ export declare interface TeardownTestFixturesOptions { /** * Custom temp directory path. Defaults to process.cwd()/tmp */ tempDir?: string; } export {};