UNPKG

synthia-test

Version:

Synthia Engine Test Plugin - 提供测试功能的 Synthia 插件

56 lines (52 loc) 1.24 kB
import { PluginFunction } from 'synthia-shared'; /** * Synthia Test 插件 - 函数式插件 * 提供统一的测试运行和覆盖率报告功能 */ interface TestPluginOptions { enabled?: boolean; framework?: 'vitest' | 'jest' | 'mocha' | 'cypress' | 'playwright'; watch?: boolean; coverage?: boolean; ci?: boolean; pattern?: string; config?: string; vitest?: { enabled?: boolean; config?: string; ui?: boolean; }; jest?: { enabled?: boolean; config?: string; watchAll?: boolean; }; mocha?: { enabled?: boolean; config?: string; reporter?: string; }; cypress?: { enabled?: boolean; config?: string; headless?: boolean; browser?: string; }; playwright?: { enabled?: boolean; config?: string; headless?: boolean; browser?: string; }; coverageConfig?: { enabled?: boolean; threshold?: number; reporters?: string[]; output?: string; }; } /** * Test 插件函数工厂 */ declare function testPlugin(options?: TestPluginOptions): PluginFunction; export { type TestPluginOptions, testPlugin };