{"id":25784,"library":"jest-circus-allure-environment","title":"Jest Circus Allure Environment","description":"Jest test environment (v1.1.1, last updated June 2021) that integrates Allure reporting with Jest Circus test runner. Generates Allure result files for rich test reports. Key differentiator: enables Allure annotations via JSDoc pragmas directly in test files. Requires Allure CLI to serve reports. Ships TypeScript types. Maintained by community, low release cadence. Alternative to allure-jest.","status":"active","version":"1.1.1","language":"javascript","source_language":"en","source_url":"https://github.com/ryparker/jest-circus-allure-environment","tags":["javascript","jest","circus","reporter","allure","environment","detailed","reports","collect","typescript"],"install":[{"cmd":"npm install jest-circus-allure-environment","lang":"bash","label":"npm"},{"cmd":"yarn add jest-circus-allure-environment","lang":"bash","label":"yarn"},{"cmd":"pnpm add jest-circus-allure-environment","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Configure as testEnvironment in jest.config.js, not imported directly.","wrong":"import { JestCircusAllureEnvironment } from 'jest-circus-allure-environment'","symbol":"default (environment)","correct":"module.exports = { testEnvironment: 'jest-circus-allure-environment' }"},{"note":"Import for TypeScript type augmentation in jest.setup.js. No named export.","wrong":"import { jestCircusAllureEnvironment } from 'jest-circus-allure-environment'","symbol":"setup import","correct":"import 'jest-circus-allure-environment'"},{"note":"CommonJS import for setup file. No destructuring.","wrong":"const { AllureEnvironment } = require('jest-circus-allure-environment')","symbol":"require setup","correct":"require('jest-circus-allure-environment')"}],"quickstart":{"code":"// jest.config.js\nmodule.exports = {\n  testEnvironment: 'jest-circus-allure-environment',\n  testRunner: 'jest-circus/runner',\n}\n\n// jest.setup.js\nimport 'jest-circus-allure-environment'\n\n// some.test.js\ntest('example', () => {\n  /**\n   * @severity critical\n   * @tag smoke\n   */\n  expect(true).toBe(true)\n})\n\n// Run: npx jest\n// Generate report: allure serve ./allure-results","lang":"javascript","description":"Configures Jest with Allure environment, sets up type augmentation, uses JSDoc pragma in test."},"warnings":[{"fix":"Rename 'categoryDefinitions' to 'categories' in jest.config.js environmentOptions.","message":"In v1.0.0, environment option 'categoryDefinitions' renamed to 'categories'.","severity":"breaking","affected_versions":">=1.0.0"},{"fix":"No action needed; just leave 'testPath' if you want per-test results.","message":"Old v0.x behavior for 'testPath' config option is default in v1.x.","severity":"deprecated","affected_versions":">=1.0.0"},{"fix":"Set testRunner: 'jest-circus/runner' in jest.config.js.","message":"Must use 'jest-circus/runner' as testRunner, not default Jasmine runner.","severity":"gotcha","affected_versions":">=0.13.0"},{"fix":"Install Allure CLI and run 'allure serve ./allure-results'.","message":"Allure CLI (Java) required to generate HTML report; node module does not serve reports.","severity":"gotcha","affected_versions":"*"},{"fix":"Place /** @tag foo */ inside the callback function of test() or describe().","message":"Docblock pragmas must be inside the test function body, not outside.","severity":"gotcha","affected_versions":"*"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run 'npm install --save-dev jest-circus-allure-environment' and ensure testEnvironment string is correct.","cause":"Package not installed or testEnvironment path incorrect.","error":"Cannot find module 'jest-circus-allure-environment' from 'jest.config.js'"},{"fix":"Use 'testEnvironment: \"jest-circus-allure-environment\"' in config, do not import directly.","cause":"Importing named export instead of setting testEnvironment string.","error":"TypeError: jestCircusAllureEnvironment is not a constructor"},{"fix":"Ensure testEnvironment and testRunner are set in jest.config.js as shown in quickstart.","cause":"Allure environment not loaded or testRunner not set.","error":"Allure .json files not generated after tests"},{"fix":"Install Allure CLI (Java): see https://docs.qameta.io/allure-report/#_installing_a_commandline","cause":"Allure CLI not installed.","error":"allure: command not found"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}