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:
2025-11-23 01:15:28 -05:00
parent 3deadc6e75
commit f007573ade
15 changed files with 218 additions and 164 deletions

View File

@@ -16,10 +16,13 @@ async function convertTAPToTeamCity() {
return;
}
const proc = Bun.spawn(["bun", "test", "--reporter=tap", ...process.argv.slice(2)], {
stdout: "pipe",
stderr: "pipe",
});
const proc = Bun.spawn(
["bun", "test", "--reporter=tap", ...process.argv.slice(2)],
{
stdout: "pipe",
stderr: "pipe",
},
);
const decoder = new TextDecoder();
let currentSuite = "Tests";
@@ -42,11 +45,15 @@ async function convertTAPToTeamCity() {
// ok 1 - test description
// not ok 2 - failed test
// # describe block
if (line.startsWith("# ")) {
// Suite/describe block
const suiteName = line.substring(2).trim();
if (suiteName && !suiteName.startsWith("tests") && !suiteName.startsWith("pass")) {
if (
suiteName &&
!suiteName.startsWith("tests") &&
!suiteName.startsWith("pass")
) {
if (testCount > 0) {
TeamcityReporter.reportSuiteEnd(currentSuite);
}
@@ -67,12 +74,11 @@ async function convertTAPToTeamCity() {
if (not) {
// Test failed
TeamcityReporter.reportTestFailed(
fullName,
"Test failed",
line,
{ comparisonFailure: false, expected: "", actual: "" }
);
TeamcityReporter.reportTestFailed(fullName, "Test failed", line, {
comparisonFailure: false,
expected: "",
actual: "",
});
}
TeamcityReporter.reportTestEnd(fullName);
@@ -96,4 +102,3 @@ convertTAPToTeamCity().catch((error) => {
console.error("Error:", error);
process.exit(1);
});