allure-jasmine
TypeScript icon, indicating that this package has built-in type declarations

2.15.1 • Public • Published

allure-jasmine

Allure integration Jasmine framework

Allure Report logo


For usage example see test/Setup.ts

Usage with Jest (jest@<27)

Use your favorite node package manager to install required packages:

npm add -D jest-jasmine2 allure-jasmine allure-js-commons @types/jasmine

Create allure-setup.ts file:

import { JasmineAllureReporter } from "allure-jasmine";
import { JasmineAllureInterface } from "allure-jasmine/dist/src/JasmineAllureReporter";

const reporter = new JasmineAllureReporter({ resultsDir: "allure-results" });

jasmine.getEnv().addReporter(reporter);
// @ts-expect-error
global.allure = reporter.getInterface();

declare global {
  const allure: JasmineAllureInterface;
}

Change your jest.config.js file:

module.exports = {
  preset: "ts-jest",
+  testRunner: "jest-jasmine2",
+  setupFilesAfterEnv: ["./allure-setup.ts"],
};

You can find example setup and usage in this repo

Readme

Keywords

none

Package Sidebar

Install

npm i allure-jasmine

Weekly Downloads

1,738

Version

2.15.1

License

Apache-2.0

Unpacked Size

30.7 kB

Total Files

11

Last publish

Collaborators

  • qameta-bot
  • baev
  • eroshenkoam