Socket
Socket
Sign inDemoInstall

jest-circus-allure-environment

Package Overview
Dependencies
10
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

jest-circus-allure-environment


Version published
Maintainers
1
Created

Changelog

Source

0.4.0 (2020-07-06)

Features

  • project wide: added support for the global "allure" report helper. Added better types support (3cc3adc)

Readme

Source

Jest Circus Allure Environment

Lint-Build-Test-Publish XO code style semantic-release License: MIT

A Jest Circus environment for Allure reporting.

Allure Report

Requirements

ResourceDescription
JestA delightful JavaScript testing framework.
Allure 2 CLI"A Java jar command line tool that turns Allure result files into beautiful Allure reports."

:rocket: Quick start

  1. Add this package
yarn add --dev jest-circus-allure-environment
  1. Update jest.config.js

See the testEnvironment docs for configuration details.

{
  "testEnvironment": ["jest-circus-allure-environment"],
  "testRunner": "jest-circus/runner"
}
  1. Run tests
yarn test
  1. Open the Allure report
allure serve ./allure-results

Allure reporting in your tests

To provide more information in your reports you can call allure from your tests. For types support you'll need some additional configuration.

// simple.test.js

test('2 + 3 is 5', () => {
  allure.epic('Implement addition functionality')
  allure.tag('Accounting')

  expect(2 + 3).toBe(5)
})

Typescript & Intellisense setup

  1. Support Typescript & intellisense by loading the module into your jest.setup.js file
// jest.setup.js

import 'jest-circus-allure-environment' // Typescript or ESM
require('jest-circus-allure-environment') // CommonJS
  1. Make sure your jest.setup.js file is properly configured.

See the setupFilesAfterEnv docs for configuration details.

// jest.config.js

{
  "setupFilesAfterEnv": ["./jest.setup.js"]
}

Keywords

FAQs

Last updated on 06 Jul 2020

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc