UNPKG

@testauto/jest-allure

Version:

A Jest Allure Reporter, which takes the test-results from jest and creates an allure-report from it.

22 lines 836 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const jest_results_1 = require("./jest_results"); const allure_1 = require("./allure"); const testsuite_1 = require("./testsuite"); class JestAllureReporter { onRunComplete(contexts, results) { allure_1.Allure.removeOldResults(); const testResultsAsJson = jest_results_1.JestResults.onRunComplete(contexts, results); results.testResults.forEach((suite) => { const testsuite = new testsuite_1.Testsuite(suite, testResultsAsJson); testsuite.writeToFileAsAllureInput(); }); allure_1.Allure.generateReport(); } } module.exports = (results) => { const reporter = new JestAllureReporter(); reporter.onRunComplete(null, results); return results; }; //# sourceMappingURL=index.js.map