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:
@@ -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);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user