Skip to content

Commit

Permalink
feat(transform_conformance): custom reporter for exec test (#7715)
Browse files Browse the repository at this point in the history
closes #7704
  • Loading branch information
Boshen committed Dec 7, 2024
1 parent 9257d9d commit 5891166
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 350 deletions.
21 changes: 21 additions & 0 deletions tasks/transform_conformance/reporter.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { JsonReporter } from 'vitest/reporters';

export default class CustomReporter extends JsonReporter {
async writeReport(report) {
const json = JSON.parse(report);
console.log();
for (const testResult of json.testResults) {
if (testResult.status !== 'failed') {
continue;
}
const message = testResult.message;
if (!message) {
continue;
}
const name = testResult.name.replace(import.meta.dirname, '.');
console.log(name);
console.log(message);
console.log();
}
}
}
Loading

0 comments on commit 5891166

Please sign in to comment.