4c8714c12d
- 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
38 lines
743 B
TypeScript
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();
|
|
}
|
|
}
|