Files
novalon-website/test-framework/shared/utils/testing/TestDataManager.ts
T
张翔 4c8714c12d feat: complete system test fixes - 100% pass rate (85/85)
- Fixed all form tests (20/20 passing)
- Fixed all performance tests (35/35 passing)
- Fixed all SEO and accessibility tests (30/30 passing)
- Enhanced test framework with custom reporting
- Added performance baseline tracking
- Improved test reliability and error handling
2026-03-06 19:37:02 +08:00

38 lines
743 B
TypeScript

export class TestDataManager {
private data: Map<string, any> = new Map();
private version: string = '1.0.0';
setData(key: string, value: any): void {
this.data.set(key, value);
}
getData(key: string): any {
return this.data.get(key);
}
getVersion(): string {
return this.version;
}
setVersion(version: string): void {
this.version = version;
}
export(): string {
return JSON.stringify({
version: this.version,
data: Object.fromEntries(this.data)
}, null, 2);
}
import(json: string): void {
const imported = JSON.parse(json);
this.version = imported.version;
this.data = new Map(Object.entries(imported.data));
}
clear(): void {
this.data.clear();
}
}