How to use the jasmine-reporters/src/junit_reporter.JUnitXmlReporter function in jasmine-reporters

To help you get started, we’ve selected a few jasmine-reporters examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github dcos / dcos-ui / jest / setupTestFramework.js View on Github external
import path from "path";
import Enzyme from "enzyme";
import Adapter from "enzyme-adapter-react-16";

Enzyme.configure({ adapter: new Adapter() });

if (process.env.JENKINS_VERSION != null) {
  const jasmineReporters = require("jasmine-reporters/src/junit_reporter");

  jasmine.getEnv().addReporter(
    new jasmineReporters.JUnitXmlReporter({
      savePath: path.join(__dirname, "test-results"),
      consolidateAll: false,
      consolidate: true
    })
  );
}