13 lines
622 B
TypeScript
Executable file
13 lines
622 B
TypeScript
Executable file
|
|
import { Project, SyntaxKind } from 'ts-morph';
|
|
const project = new Project({ tsConfigFilePath: 'C:/ScriptoriumAI/scriptoriumai-ui/tsconfig.json' });
|
|
const sf = project.getSourceFileOrThrow('C:/ScriptoriumAI/scriptoriumai-ui/src/__tests__/Runboard.telemetry-lockstep-parity.test.tsx');
|
|
|
|
const tests = sf.getDescendantsOfKind(SyntaxKind.CallExpression).filter(c => c.getExpression().getText() === 'it');
|
|
tests.sort((a,b) => b.getWidth() - a.getWidth());
|
|
for(let i=0; i<4; i++) {
|
|
const testCall = tests[i];
|
|
if (!testCall) break;
|
|
console.log('Test ' + i + ' title: ' + testCall.getArguments()[0].getText());
|
|
}
|
|
|