Update ESLint configuration, package.json, and README; improve formatting and versioning consistency. Adjust TypeScript configuration to disallow importing extensions and refine test scripts for better readability.
This commit is contained in:
@@ -6,6 +6,7 @@ const isTeamCity = process.env.TEAMCITY_VERSION !== undefined;
|
||||
|
||||
// Strip ANSI color codes
|
||||
function stripAnsi(str: string): string {
|
||||
// eslint-disable-next-line no-control-regex
|
||||
return str.replace(/\x1b\[[0-9;]*m/g, "");
|
||||
}
|
||||
|
||||
@@ -32,7 +33,7 @@ async function runTests() {
|
||||
});
|
||||
|
||||
const suiteStack: string[] = [];
|
||||
|
||||
|
||||
// Read stdout as text
|
||||
const output = await new Response(proc.stdout).text();
|
||||
const lines = output.split("\n");
|
||||
@@ -46,8 +47,11 @@ async function runTests() {
|
||||
|
||||
// Check for test suite/describe blocks (files ending with .test.ts)
|
||||
if (line.match(/tests\/.+\.test\.ts:$/)) {
|
||||
const fileName = line.replace(":", "").replace("tests/", "").replace(".test.ts", "");
|
||||
|
||||
const fileName = line
|
||||
.replace(":", "")
|
||||
.replace("tests/", "")
|
||||
.replace(".test.ts", "");
|
||||
|
||||
// End previous suite if exists
|
||||
while (suiteStack.length > 0) {
|
||||
const oldSuite = suiteStack.pop();
|
||||
@@ -73,12 +77,11 @@ async function runTests() {
|
||||
if (failMatch) {
|
||||
const testName = failMatch[1].trim();
|
||||
TeamcityReporter.reportTestStart(testName);
|
||||
TeamcityReporter.reportTestFailed(
|
||||
testName,
|
||||
"Test failed",
|
||||
line,
|
||||
{ comparisonFailure: false, expected: "", actual: "" }
|
||||
);
|
||||
TeamcityReporter.reportTestFailed(testName, "Test failed", line, {
|
||||
comparisonFailure: false,
|
||||
expected: "",
|
||||
actual: "",
|
||||
});
|
||||
TeamcityReporter.reportTestEnd(testName);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user