18 lines
754 B
TypeScript
Executable file
18 lines
754 B
TypeScript
Executable file
import * as fs from 'fs';
|
|
|
|
const filePath = 'C:/ScriptoriumAI/scriptoriumai-ui/src/__tests__/Runboard.telemetry-lockstep-parity.test.tsx';
|
|
console.log('Reading file...');
|
|
const content = fs.readFileSync(filePath, 'utf8');
|
|
|
|
console.log('Length in characters:', content.length);
|
|
|
|
// Finding arrays/objects passed to mockResolvedValueOnce
|
|
const mockMatches = content.match(/\.mockResolvedValueOnce\(\{[\s\S]{1,50000}?\}\s+as any\)/g);
|
|
console.log('Found mock matches:', mockMatches ? mockMatches.length : 0);
|
|
|
|
const arrMatches = content.match(/\[\s*\{\s*run_id:[\s\S]*?\]/g);
|
|
if (arrMatches) {
|
|
let totalSize = 0;
|
|
arrMatches.forEach(m => totalSize += m.length);
|
|
console.log('Found large arrays:', arrMatches.length, 'Total size:', totalSize);
|
|
}
|