@mate-academy/jest-mochawesome-reporter

1.0.0 • Public • Published

@mate-academy/jest-mochawesome-reporter npm package

Description

This package is a reporter for Jest that generates a report in mochawesome compatible JSON format. You can use it with mochawesome to show a fancy report in HTML format.

Install

  • npm i -D @mate-academy/jest-mochawesome-reporter

Usage

  • add @mate-academy/jest-mochawesome-reporter to jest.config.js:
module.exports = {
  ...
  reporters: [
    'default', // to see console output
    '@mate-academy/jest-mochawesome-reporter'
  ],
  ...
};
  • configuration is optional, default values:
module.exports = {
  ...
  reporters: [
    'default',
    [
      '@mate-academy/jest-mochawesome-reporter',
      {
        outputDir: '<globalConfig.rootDir>', // rootDir from jest.config.js
        outputName: 'jest-mochawesome',
        createDirIfMissing: false,
      },
    ],
  ],
  ...
};

Package Sidebar

Install

npm i @mate-academy/jest-mochawesome-reporter

Weekly Downloads

18

Version

1.0.0

License

MIT

Unpacked Size

5.15 kB

Total Files

3

Last publish

Collaborators

  • mateacademy