allure-mocha v2.15.1
allure-mocha
This project implements Allure integration with Mocha framework.
Installation
npm i allure-mocha mocha --save-dev
or via yarn:
yarn add allure-mocha mocha --dev
Note that it's recommended to add the following dependencies as well for better user experience:
- typescript
- mocha-typescript
- source-map-support
Usage
Either add allure-mocha into mocha.opts:
--reporter allure-mocha
Or pass the same value via commandline / scripts:
mocha -R allure-mocha
If you want to provide extra information, such as steps and attachments, import the allure
object
into your code:
// es-modules
import { allure } from 'allure-mocha/runtime';
// or commonjs
const { allure } = require('allure-mocha/runtime');
it('is a test', () => {
allure.epic('Some info');
});
Decorators Support
To make tests more readable and avoid explicit API calls, you can use a special extension - ts-test-decorators.
Examples
See mocha-allure2-example project, which is already configured to use latest Allure 2 features with decorators support.
Thanks
@srg-kostyrko for help and assistance.
25 days ago
1 month ago
2 months ago
2 months ago
2 months ago
3 months ago
3 months ago
3 months ago
3 months ago
4 months ago
4 months ago
5 months ago
9 months ago
8 months ago
8 months ago
7 months ago
8 months ago
8 months ago
7 months ago
7 months ago
12 months ago
11 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
4 years ago
4 years ago
5 years ago
5 years ago
5 years ago
9 years ago