Add CLI config, bin scripts, CI workflow and types
Some checks failed
CI / test (push) Failing after 2m3s
Some checks failed
CI / test (push) Failing after 2m3s
This commit is contained in:
54
src/types.ts
Normal file
54
src/types.ts
Normal file
@@ -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<string, unknown>;
|
||||
}
|
||||
Reference in New Issue
Block a user