allure-jasmine
Advanced tools
Comparing version 2.5.0 to 2.6.0
@@ -84,5 +84,2 @@ "use strict"; | ||
allureTest.stage = allure_js_commons_1.Stage.RUNNING; | ||
(0, allure_js_commons_1.getSuitesLabels)(this.groupStack.map(({ name }) => name)).forEach((label) => { | ||
allureTest.addLabel(label.name, label.value); | ||
}); | ||
for (const labels of this.labelStack) { | ||
@@ -135,2 +132,5 @@ for (const label of labels) { | ||
this.groupStack.pop(); | ||
(0, allure_js_commons_1.getSuitesLabels)(this.groupStack.map(({ name }) => name)).forEach((label) => { | ||
currentTest.addLabel(label.name, label.value); | ||
}); | ||
} | ||
@@ -137,0 +137,0 @@ suiteDone() { |
{ | ||
"name": "allure-jasmine", | ||
"version": "2.5.0", | ||
"version": "2.6.0", | ||
"description": "Allure Jasmine integration", | ||
@@ -35,3 +35,3 @@ "license": "Apache-2.0", | ||
"dependencies": { | ||
"allure-js-commons": "2.5.0" | ||
"allure-js-commons": "2.6.0" | ||
}, | ||
@@ -38,0 +38,0 @@ "nyc": { |
@@ -6,1 +6,40 @@ # allure-jasmine | ||
For usage example see `test/Setup.ts` | ||
## Usage with Jest (`jest@<27`) | ||
Use your favorite node package manager to install required packages: | ||
```bash | ||
npm add -D jest-jasmine2 allure-jasmine allure-js-commons @types/jasmine | ||
``` | ||
Create `allure-setup.ts` file: | ||
```ts | ||
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: | ||
```js | ||
module.exports = { | ||
preset: "ts-jest", | ||
+ testRunner: "jest-jasmine2", | ||
+ setupFilesAfterEnv: ["./allure-setup.ts"], | ||
}; | ||
``` | ||
You can find example setup and usage in this [repo](https://github.com/vovsemenv/allure-jest-example) | ||
[allure-jest]: https://github.com/allure-framework/allure-js/tree/master/packages/allure-jest |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
29651
45
+ Addedallure-js-commons@2.6.0(transitive)
- Removedallure-js-commons@2.5.0(transitive)
Updatedallure-js-commons@2.6.0