You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mercury-parser/scripts/write-test-report.js

19 lines
463 B
JavaScript

const path = require('path');
const fs = require('fs');
const { getReport } = require('@postlight/ci-failed-test-reporter');
const report = getReport(path.join(__dirname, '../', '/test-output.json'));
if (report) {
const commentPath = 'tmp/artifacts/comment.json';
fs.mkdirSync('tmp');
fs.mkdirSync('tmp/artifacts');
fs.writeFileSync(
commentPath,
JSON.stringify({
body: report,
issue: process.env.CIRCLE_PULL_REQUEST,
})
);
}