nitro-test-utils
Version:
Testing environment and utilities for Nitro
42 lines (39 loc) • 1.11 kB
TypeScript
import { UserConfig } from 'vite';
import { T as TestOptions } from './shared/nitro-test-utils.JwyvVsQ9.js';
import 'listhen';
import 'nitropack';
interface NitroInlineConfig {
/**
* Whether to add the Nitro source directory to rerun tests when source files change.
*
* @default true
*/
rerunOnSourceChanges?: boolean;
/**
* Options for a global Nitro server instance for all tests.
*/
global?: TestOptions;
/**
* @deprecated Use the `global.rootDir` option instead.
* @default 'development'
*/
mode?: 'development' | 'production';
/**
* @deprecated Use the `global.rootDir` option instead.
* @default process.cwd()
*/
rootDir?: string;
}
declare module 'vite' {
interface UserConfig {
/**
* Options for the Nitro test runner.
*/
nitro?: Omit<NitroInlineConfig, 'global'> & {
global?: boolean | TestOptions;
};
}
}
declare function defineConfig(userConfig?: UserConfig): Promise<UserConfig>;
export { defineConfig };
export type { NitroInlineConfig };