22 lines
915 B
JavaScript
Executable file
22 lines
915 B
JavaScript
Executable file
const fs = require('fs');
|
|
|
|
const monolithPath = 'c:/ScriptoriumAI/scriptoriumai-ui/src/__tests__/Runboard.states.test.tsx';
|
|
const targetPath = 'c:/ScriptoriumAI/scriptoriumai-ui/src/__tests__/Runboard.compare-route-clear-filter.test.tsx';
|
|
|
|
const monolith = fs.readFileSync(monolithPath, 'utf8').split('\n');
|
|
|
|
const header = monolith.slice(0, 86);
|
|
const itBlockStart = monolith.findIndex(line => line.includes("executes compare-route project-filter clear from command bus action"));
|
|
const itBlockEnd = monolith.findIndex(line => line.includes("surfaces compare-route run selection blocker"));
|
|
|
|
const block = monolith.slice(itBlockStart, itBlockEnd);
|
|
|
|
const newContent = [
|
|
...header,
|
|
"describe('Runboard compare-route clear filter', () => {",
|
|
...block,
|
|
"})"
|
|
].join('\n');
|
|
|
|
fs.writeFileSync(targetPath, newContent, 'utf8');
|
|
console.log('Extraction complete! Found block from', itBlockStart, 'to', itBlockEnd);
|