Skip to content

Commit 59e821c

Browse files
committed
make prettier
1 parent 535b010 commit 59e821c

3 files changed

Lines changed: 10 additions & 10 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"build": "tsc",
1313
"prepare": "npm run build",
1414
"package": "ncc build --minify",
15-
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
15+
"test": "NODE_OPTIONS='--experimental-vm-modules' jest",
1616
"all": "npm run format-check && npm test && npm run build && npm run package",
1717
"ci": "npm run clean && npm ci --ignore-scripts && npm run all"
1818
},

src/testResultsSummary.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,10 @@ export function getTestResults(
9191
(file) => file.startsWith(filePrefix) && file.endsWith(fileSuffix),
9292
);
9393
} catch (e) {
94-
console.error(`An error occurred while finding test results summary file(s) in directory ${runnerTemp}:`, e);
94+
console.error(
95+
`An error occurred while finding test results summary file(s) in directory ${runnerTemp}:`,
96+
e,
97+
);
9598
return null;
9699
}
97100

@@ -212,9 +215,7 @@ export function addSummary(
212215

213216
// Add detailed results for this session
214217
const detailedResults = getDetailedResults(session.TestResults);
215-
core.summary
216-
.addHeading("All tests", 4)
217-
.addRaw(detailedResults, true);
218+
core.summary.addHeading("All tests", 4).addRaw(detailedResults, true);
218219
}
219220
}
220221
} catch (e) {

src/testResultsSummary.unit.test.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,8 @@ describe("Artifact Processing Tests", () => {
6464
});
6565

6666
beforeEach(() => {
67-
// Clear mock calls before each test
68-
mockAddHeading.mockClear();
69-
mockAddRaw.mockClear();
67+
mockAddHeading.mockClear().mockReturnThis();
68+
mockAddRaw.mockClear().mockReturnThis();
7069
});
7170

7271
function getOSInfo() {
@@ -490,8 +489,8 @@ describe("HTML Structure Tests", () => {
490489

491490
describe("Error Handling Tests", () => {
492491
beforeEach(() => {
493-
mockAddHeading.mockClear();
494-
mockAddRaw.mockClear();
492+
mockAddHeading.mockClear().mockReturnThis();
493+
mockAddRaw.mockClear().mockReturnThis();
495494
});
496495

497496
it("should handle errors gracefully in addSummary", () => {

0 commit comments

Comments
 (0)