From cde1116b42c633105f306a3508514c5c6304e64b Mon Sep 17 00:00:00 2001 From: 7000pctAUTO Date: Thu, 29 Jan 2026 10:07:38 +0000 Subject: [PATCH] Add CLI config, bin scripts, CI workflow and types --- src/types.ts | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 src/types.ts diff --git a/src/types.ts b/src/types.ts new file mode 100644 index 0000000..1ba30a1 --- /dev/null +++ b/src/types.ts @@ -0,0 +1,54 @@ +export type TestFramework = 'jest' | 'pytest' | 'go'; + +export interface TestCondition { + type: 'should' | 'must' | 'will' | 'rejects' | 'accepts' | 'returns' | 'throws' | 'validates'; + subject: string; + action: string; + assertion: string; + input?: string; + expectedOutput?: string; +} + +export interface ParsedRequirement { + original: string; + subject: string; + conditions: TestCondition[]; + edgeCases: string[]; + dataType?: string; +} + +export interface EdgeCase { + type: string; + value: string; + description: string; + inputType: 'email' | 'password' | 'number' | 'string' | 'date' | 'boolean' | 'array' | 'object'; +} + +export interface FrameworkInfo { + name: TestFramework; + confidence: number; + detectedFrom: string; + files: string[]; +} + +export interface GenerateOptions { + framework?: TestFramework; + output?: string; + interactive?: boolean; + json?: boolean; +} + +export interface TemplateContext { + functionName: string; + conditions: TestCondition[]; + edgeCases: EdgeCase[]; + framework: TestFramework; +} + +export interface Config { + defaultFramework?: TestFramework; + outputFormat?: 'stdout' | 'file' | 'clipboard'; + outputPath?: string; + suggestEdgeCases?: boolean; + templates?: Record; +}