26 lines
794 B
TypeScript
Executable file
26 lines
794 B
TypeScript
Executable file
|
|
import * as fs from "fs";
|
|
const content = fs.readFileSync("C:/ScriptoriumAI/scriptoriumai-ui/src/__tests__/Runboard.telemetry-lockstep-parity.test.tsx", "utf8");
|
|
const lines = content.split("\n");
|
|
let count = 0;
|
|
let blockStart = 0;
|
|
let maxBlock = 0;
|
|
let maxBlockStart = 0;
|
|
let currentTag = "";
|
|
for (let i = 0; i < lines.length; i++) {
|
|
if (lines[i].includes("===============")) {
|
|
// Just checking structure
|
|
}
|
|
}
|
|
|
|
// Group lines by indentation or by function
|
|
let describeCount = 0;
|
|
let itCount = 0;
|
|
let expectCount = 0;
|
|
for (let line of lines) {
|
|
if (line.includes("describe(")) describeCount++;
|
|
if (line.includes("it(")) itCount++;
|
|
if (line.includes("expect(")) expectCount++;
|
|
}
|
|
console.log(`Describes: ${describeCount}, Its: ${itCount}, Expects: ${expectCount}`);
|
|
|