Is it possible to use 'allure-jest' with custom testEnvironment ? #2840
-
Motivation: use custom testEnvironment for applying specific hooks, instead of using default "allure-jest/node"/"allure-jest/jsdom"
CustomTestEnvironment.ts
Allure results are not created, because of:
I have tried to force create allure runtime, like it is done here:https://github.com/allure-framework/allure-js/blob/f0753df5c068bbd6d48970df6012a8e4b4001814/packages/allure-vitest/src/setup.ts#L12
Thanks in advance, any help is appreciated |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Starting from 3.0.8, you can use import { createJestEnvironment } from "allure-jest/factory";
export default createJestEnvironment(WMETestEnvironment); |
Beta Was this translation helpful? Give feedback.
-
@baev thanks a lot! |
Beta Was this translation helpful? Give feedback.
Starting from 3.0.8, you can use
createJestEnvironment
helper function to use Allure with custom environments: