Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

allure-mochajs

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

allure-mochajs

Allure Mocha integration

  • 2.0.0-beta.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

allure-mochajs

This project implements Allure integration with Mocha framework.

Installation

npm i allure-mochajs mocha --save-dev

or via yarn:

yarn add allure-mochajs mocha --dev

Note that it's recommended to add the following dependencies as well for better user experience:

  • typescript
  • mocha-typescript
  • source-map-support

Allure types configuration

Add the following into your tsconfig.json to access exported Allure types.

    "typeRoots": [
      "./node_modules/allure-js-commons/dist/declarations/**/"
    ]

Usage

Either add allure-mochajs into mocha.opts:

--ui mocha-typescript
--require source-map-support/register
--reporter allure-mochajs

Or pass the same value via commandline / scripts:

mocha -R allure-mochajs

Now you can access a global allure object from within your project:

const allure: AllureInterface = global.allure;

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.

Keywords

FAQs

Package last updated on 24 May 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc