c4lifa / jest-allure-circus

Allure reporting for newest Jest Circus v28.1
MIT License
4 stars 7 forks source link

Using Jest 29- after configuring allure: Test environment jest-circus-allure cannot be found. Make sure the testEnvironment configuration option points to an existing node module #153

Closed saritvakrat closed 1 year ago

saritvakrat commented 1 year ago

Describe the bug

Using Jest 29- after configuring allure: Test environment jest-circus-allure cannot be found. Make sure the testEnvironment configuration option points to an existing node module

To Reproduce configure:

  1. npm i jest-allure-circus
  2. testRunner: "jest-circus/runner",
  3. testEnvironment: "jest-circus-allure",
  4. try to run any test

Actual behavior

Jest throws and error ` Validation Error:

Test environment jest-circus-allure cannot be found. Make sure the testEnvironment configuration option points to an existing node module.

Configuration Documentation: https://jestjs.io/docs/configuration`

Expected behavior

You can run tests and allure without issues

Screenshots

image

Jest version: "ts-jest": "^29.0.3" allure version: "jest-allure-circus": "^1.0.21",

KillWolfVlad commented 1 year ago

Test env should be jest-allure-circus. Docs is wrong. Look up to my jest config as example in package.json

{
  "jest": {
    "moduleFileExtensions": [
      "ts",
      "js"
    ],
    "resetMocks": true,
    "rootDir": "./",
    "roots": [
      "<rootDir>/src",
      "<rootDir>/test"
    ],
    "setupFilesAfterEnv": [
      "jest-extended/all",
      "./src/main.ts"
    ],
    "testEnvironment": "jest-allure-circus",
    "testEnvironmentOptions": {
      "jiraUrl": "https://jira.example.com/browse/",
      "tmsUrl": "https://allure.example.com/project/1/test-cases/"
    },
    "testRegex": ".*\\.spec\\.ts$",
    "testTimeout": 120000,
    "transform": {
      "^.+\\.ts$": "ts-jest"
    }
  }
}
c4lifasecondary commented 1 year ago

Fixed. Will be added to 1.0.22.

streLer commented 1 year ago

when 1.0.22 planning to release? thanks

saritvakrat commented 1 year ago

Works after change thanks