allure-jest 3.14.0 → 3.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -46,7 +46,7 @@ npm install -D allure-jest
46
46
 
47
47
  Install Allure Report separately when you want to render the generated `allure-results`:
48
48
 
49
- - follow the [Allure Report 2 installation guide](https://allurereport.org/docs/install/) to use the `allure` CLI
49
+ - follow the [Allure Report 2 installation guide](https://allurereport.org/docs/v2/install/) to use the `allure` CLI
50
50
  - or install Allure Report 3 with `npm install -D allure` to use `npx allure`
51
51
 
52
52
  ## Supported versions and platforms
@@ -20,20 +20,22 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
20
20
  function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
21
21
  function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
22
22
  function _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }
23
+ function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
23
24
  function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
24
25
  function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
25
26
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
26
27
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
28
+ function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
27
29
  function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
28
30
  var createJestEnvironment = Base => {
29
- var _Class_brand;
31
+ var _testContexts, _Class_brand;
30
32
  // @ts-expect-error (ts(2545)) Incorrect assumption about a mixin class: https://github.com/microsoft/TypeScript/issues/37142
31
- return _Class_brand = /*#__PURE__*/new WeakSet(), class extends Base {
33
+ return _testContexts = /*#__PURE__*/new WeakMap(), _Class_brand = /*#__PURE__*/new WeakSet(), class extends Base {
32
34
  // config is AllureJestConfig in Jest v28 or greater. In older versions
33
35
  // it's AllureJestProjectConfig. See https://github.com/jestjs/jest/pull/12461
34
- constructor(config, context) {
36
+ constructor(config, _context) {
35
37
  var _this$handleTestEvent;
36
- super(config, context);
38
+ super(config, _context);
37
39
  _classPrivateMethodInitSpec(this, _Class_brand);
38
40
  _defineProperty(this, "testPath", void 0);
39
41
  _defineProperty(this, "testPlan", void 0);
@@ -44,11 +46,16 @@ var createJestEnvironment = Base => {
44
46
  scopes: [],
45
47
  skippedTestsFullNamesByTestPlan: []
46
48
  });
49
+ _classPrivateFieldInitSpec(this, _testContexts, new Map());
47
50
  var handleTestEvent = (_this$handleTestEvent = this.handleTestEvent) === null || _this$handleTestEvent === void 0 ? void 0 : _this$handleTestEvent.bind(this);
48
51
 
49
52
  // Preserve any event handler defined by the base or custom environment.
50
53
  this.handleTestEvent = (event, state) => {
51
- var handleAllureEvent = () => _assertClassBrand(_Class_brand, this, _handleTestEvent).call(this, event, state);
54
+ var _this$global$expect$g, _this$global$expect, _this$global$expect$g2, _this$global$expect$g3;
55
+ // Capture the hook owner before a custom handler can yield or change
56
+ // Circus's shared cursor. Runtime messages use the same native identity.
57
+ var hookTest = event.name === "hook_start" ? (_this$global$expect$g = (_this$global$expect = this.global.expect) === null || _this$global$expect === void 0 || (_this$global$expect$g2 = (_this$global$expect$g3 = _this$global$expect.getState()).currentTestIdentity) === null || _this$global$expect$g2 === void 0 ? void 0 : _this$global$expect$g2.call(_this$global$expect$g3)) !== null && _this$global$expect$g !== void 0 ? _this$global$expect$g : state.currentlyRunningTest : undefined;
58
+ var handleAllureEvent = () => _assertClassBrand(_Class_brand, this, _handleTestEvent).call(this, event, hookTest);
52
59
 
53
60
  // Keep Allure's lifecycle in sync even if the custom environment fails,
54
61
  // then rethrow the original error so Jest keeps its native behavior.
@@ -74,7 +81,7 @@ var createJestEnvironment = Base => {
74
81
  resultsDir
75
82
  })
76
83
  }));
77
- this.testPath = (0, _nodePath.relative)(projectConfig.rootDir, context.testPath);
84
+ this.testPath = (0, _nodePath.relative)(projectConfig.rootDir, _context.testPath);
78
85
  this.testPlan = (0, _reporter.parseTestPlan)();
79
86
 
80
87
  // @ts-ignore
@@ -91,7 +98,11 @@ var createJestEnvironment = Base => {
91
98
  return super.teardown();
92
99
  }
93
100
  handleAllureRuntimeMessage(message) {
94
- var executableUuid = (0, _utils.last)(this.runContext.executables);
101
+ var _this$global$expect2, _context$fixtureUuid, _ref2, _last;
102
+ var getIdentity = (_this$global$expect2 = this.global.expect) === null || _this$global$expect2 === void 0 ? void 0 : _this$global$expect2.getState().currentTestIdentity;
103
+ var identity = getIdentity === null || getIdentity === void 0 ? void 0 : getIdentity();
104
+ var context = getIdentity ? identity && _classPrivateFieldGet(_testContexts, this).get(identity) : (0, _utils.last)([..._classPrivateFieldGet(_testContexts, this).values()]);
105
+ var executableUuid = getIdentity && identity ? (_context$fixtureUuid = context === null || context === void 0 ? void 0 : context.fixtureUuid) !== null && _context$fixtureUuid !== void 0 ? _context$fixtureUuid : context === null || context === void 0 ? void 0 : context.uuid : (_ref2 = (_last = (0, _utils.last)(this.runContext.executables)) !== null && _last !== void 0 ? _last : context === null || context === void 0 ? void 0 : context.fixtureUuid) !== null && _ref2 !== void 0 ? _ref2 : context === null || context === void 0 ? void 0 : context.uuid;
95
106
  if (executableUuid) {
96
107
  this.runtime.applyRuntimeMessages(executableUuid, [message]);
97
108
  } else {
@@ -99,16 +110,16 @@ var createJestEnvironment = Base => {
99
110
  }
100
111
  }
101
112
  };
102
- function _handleTestEvent(event, _state) {
113
+ function _handleTestEvent(event, hookTest) {
103
114
  switch (event.name) {
104
115
  case "hook_start":
105
- _assertClassBrand(_Class_brand, this, _handleHookStart).call(this, event.hook);
116
+ _assertClassBrand(_Class_brand, this, _handleHookStart).call(this, event.hook, hookTest);
106
117
  break;
107
118
  case "hook_success":
108
- _assertClassBrand(_Class_brand, this, _handleHookPass).call(this, event.hook);
119
+ _assertClassBrand(_Class_brand, this, _handleHookPass).call(this, event.hook, event.test);
109
120
  break;
110
121
  case "hook_failure":
111
- _assertClassBrand(_Class_brand, this, _handleHookFail).call(this, event.hook, event.error);
122
+ _assertClassBrand(_Class_brand, this, _handleHookFail).call(this, event.hook, event.error, event.test);
112
123
  break;
113
124
  case "run_describe_start":
114
125
  _assertClassBrand(_Class_brand, this, _handleSuiteStart).call(this);
@@ -117,7 +128,7 @@ var createJestEnvironment = Base => {
117
128
  _assertClassBrand(_Class_brand, this, _handleSuiteEnd).call(this);
118
129
  break;
119
130
  case "test_start":
120
- _assertClassBrand(_Class_brand, this, _handleTestScopeStart).call(this);
131
+ _assertClassBrand(_Class_brand, this, _handleTestScopeStart).call(this, event.test);
121
132
  break;
122
133
  case "test_fn_start":
123
134
  _assertClassBrand(_Class_brand, this, _handleTestStart).call(this, event.test);
@@ -160,32 +171,48 @@ var createJestEnvironment = Base => {
160
171
  function _handleSuiteEnd() {
161
172
  _assertClassBrand(_Class_brand, this, _stopScope).call(this);
162
173
  }
163
- function _handleHookStart(hook) {
174
+ function _handleHookStart(hook, test) {
175
+ var _context$scopeUuid;
164
176
  if ((0, _utils.shouldHookBeSkipped)(hook)) {
165
177
  return;
166
178
  }
167
- var scopeUuid = (0, _utils.last)(this.runContext.scopes);
179
+ var context = test && hook.type.endsWith("Each") ? _classPrivateFieldGet(_testContexts, this).get(test) : undefined;
180
+ var scopeUuid = (_context$scopeUuid = context === null || context === void 0 ? void 0 : context.scopeUuid) !== null && _context$scopeUuid !== void 0 ? _context$scopeUuid : (0, _utils.last)(this.runContext.scopes);
168
181
  var fixtureUuid = this.runtime.startFixture(scopeUuid, /after/i.test(hook.type) ? "after" : "before", {
169
182
  name: hook.type
170
183
  });
171
- this.runContext.executables.push(fixtureUuid);
184
+ if (context) {
185
+ context.fixtureUuid = fixtureUuid;
186
+ } else {
187
+ this.runContext.executables.push(fixtureUuid);
188
+ }
172
189
  }
173
- function _handleHookPass(hook) {
190
+ function _handleHookPass(hook, test) {
191
+ var _context$fixtureUuid2;
174
192
  if ((0, _utils.shouldHookBeSkipped)(hook)) {
175
193
  return;
176
194
  }
177
- var fixtureUuid = this.runContext.executables.pop();
195
+ var context = test ? _classPrivateFieldGet(_testContexts, this).get(test) : undefined;
196
+ var fixtureUuid = (_context$fixtureUuid2 = context === null || context === void 0 ? void 0 : context.fixtureUuid) !== null && _context$fixtureUuid2 !== void 0 ? _context$fixtureUuid2 : this.runContext.executables.pop();
197
+ if (context) {
198
+ delete context.fixtureUuid;
199
+ }
178
200
  this.runtime.updateFixture(fixtureUuid, r => {
179
201
  r.status = _allureJsCommons.Status.PASSED;
180
202
  r.stage = _allureJsCommons.Stage.FINISHED;
181
203
  });
182
204
  this.runtime.stopFixture(fixtureUuid);
183
205
  }
184
- function _handleHookFail(hook, error) {
206
+ function _handleHookFail(hook, error, test) {
207
+ var _context$fixtureUuid3;
185
208
  if ((0, _utils.shouldHookBeSkipped)(hook)) {
186
209
  return;
187
210
  }
188
- var fixtureUuid = this.runContext.executables.pop();
211
+ var context = test ? _classPrivateFieldGet(_testContexts, this).get(test) : undefined;
212
+ var fixtureUuid = (_context$fixtureUuid3 = context === null || context === void 0 ? void 0 : context.fixtureUuid) !== null && _context$fixtureUuid3 !== void 0 ? _context$fixtureUuid3 : this.runContext.executables.pop();
213
+ if (context) {
214
+ delete context.fixtureUuid;
215
+ }
189
216
  var status = typeof error === "string" ? _allureJsCommons.Status.BROKEN : (0, _sdk.getStatusFromError)(error);
190
217
  var statusDetails = typeof error === "string" ? {
191
218
  message: error
@@ -225,6 +252,7 @@ var createJestEnvironment = Base => {
225
252
  this.runContext.skippedTestsFullNamesByTestPlan.push(newTestFullName);
226
253
  return;
227
254
  }
255
+ var context = _assertClassBrand(_Class_brand, this, _handleTestScopeStart).call(this, test);
228
256
  var testUuid = this.runtime.startTest({
229
257
  name: cleanTitle,
230
258
  fullName: newTestFullName,
@@ -233,15 +261,23 @@ var createJestEnvironment = Base => {
233
261
  labels: [(0, _reporter.getLanguageLabel)(), (0, _reporter.getFrameworkLabel)("jest"), (0, _reporter.getPackageLabel)(this.testPath), (0, _reporter.getFallbackTestCaseIdLabel)((0, _reporter.md5)(legacyFullName)), (0, _reporter.getHostLabel)(), (0, _reporter.getThreadLabel)(_nodeProcess.env.JEST_WORKER_ID), ...(0, _reporter.getEnvironmentLabels)(), ...(0, _reporter.getSuiteLabels)(newTestSuitePath), ...labels],
234
262
  titlePath,
235
263
  links
236
- }, this.runContext.scopes);
237
- this.runContext.executables.push(testUuid);
264
+ }, [...this.runContext.scopes, context.scopeUuid]);
265
+ context.uuid = testUuid;
238
266
  return testUuid;
239
267
  }
240
- function _handleTestScopeStart() {
241
- _assertClassBrand(_Class_brand, this, _startScope).call(this);
268
+ function _handleTestScopeStart(test) {
269
+ var context = _classPrivateFieldGet(_testContexts, this).get(test);
270
+ if (!context) {
271
+ context = {
272
+ scopeUuid: this.runtime.startScope()
273
+ };
274
+ _classPrivateFieldGet(_testContexts, this).set(test, context);
275
+ }
276
+ return context;
242
277
  }
243
278
  function _handleTestScopeStop(test) {
244
- var testUuid = this.runContext.executables.pop();
279
+ var context = _classPrivateFieldGet(_testContexts, this).get(test);
280
+ var testUuid = context === null || context === void 0 ? void 0 : context.uuid;
245
281
  if (testUuid) {
246
282
  var _tr, _tr2;
247
283
  var {
@@ -262,7 +298,10 @@ var createJestEnvironment = Base => {
262
298
  }
263
299
  this.runtime.writeTest(testUuid);
264
300
  }
265
- _assertClassBrand(_Class_brand, this, _stopScope).call(this);
301
+ if (context) {
302
+ this.runtime.writeScope(context.scopeUuid);
303
+ _classPrivateFieldGet(_testContexts, this).delete(test);
304
+ }
266
305
  }
267
306
  function _startScope() {
268
307
  var scopeUuid = this.runtime.startScope();
@@ -276,8 +315,8 @@ var createJestEnvironment = Base => {
276
315
  this.runtime.writeScope(scopeUuid);
277
316
  }
278
317
  function _handleTestPass(test) {
279
- var _test$duration;
280
- var testUuid = _assertClassBrand(_Class_brand, this, _currentExecutable).call(this);
318
+ var _classPrivateFieldGet2, _test$duration;
319
+ var testUuid = (_classPrivateFieldGet2 = _classPrivateFieldGet(_testContexts, this).get(test)) === null || _classPrivateFieldGet2 === void 0 ? void 0 : _classPrivateFieldGet2.uuid;
281
320
  if (!testUuid) {
282
321
  return;
283
322
  }
@@ -296,8 +335,8 @@ var createJestEnvironment = Base => {
296
335
  });
297
336
  }
298
337
  function _handleTestFail(test) {
299
- var _test$duration2;
300
- var testUuid = _assertClassBrand(_Class_brand, this, _currentExecutable).call(this);
338
+ var _classPrivateFieldGet3, _test$duration2;
339
+ var testUuid = (_classPrivateFieldGet3 = _classPrivateFieldGet(_testContexts, this).get(test)) === null || _classPrivateFieldGet3 === void 0 ? void 0 : _classPrivateFieldGet3.uuid;
301
340
  if (!testUuid) {
302
341
  return;
303
342
  }
@@ -315,6 +354,7 @@ var createJestEnvironment = Base => {
315
354
  function _handleTestSkip(test) {
316
355
  var newTestFullName = _assertClassBrand(_Class_brand, this, _getTestFullName).call(this, test);
317
356
  if (this.runContext.skippedTestsFullNamesByTestPlan.includes(newTestFullName)) {
357
+ _assertClassBrand(_Class_brand, this, _handleTestScopeStop).call(this, test);
318
358
  return;
319
359
  }
320
360
 
@@ -350,12 +390,6 @@ var createJestEnvironment = Base => {
350
390
  this.runtime.writeEnvironmentInfo();
351
391
  this.runtime.writeCategoriesDefinitions();
352
392
  }
353
- function _currentExecutable() {
354
- if (this.runContext.executables.length === 0) {
355
- return undefined;
356
- }
357
- return this.runContext.executables[this.runContext.executables.length - 1];
358
- }
359
393
  function _statusAndDetails(errors) {
360
394
  if (errors.length === 0) {
361
395
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"environmentFactory.js","names":["_nodePath","require","_nodeProcess","_allureJsCommons","_interopRequireWildcard","allure","_sdk","_reporter","_runtime","_AllureJestTestRuntime","_utils","_excluded","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ownKeys","keys","getOwnPropertySymbols","filter","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","_objectWithoutProperties","_objectWithoutPropertiesLoose","indexOf","propertyIsEnumerable","_classPrivateMethodInitSpec","a","_checkPrivateRedeclaration","add","TypeError","_toPropertyKey","value","configurable","writable","_toPrimitive","Symbol","toPrimitive","String","Number","_assertClassBrand","createJestEnvironment","Base","_Class_brand","WeakSet","constructor","config","context","_this$handleTestEvent","executables","steps","scopes","skippedTestsFullNamesByTestPlan","handleTestEvent","bind","event","state","handleAllureEvent","_handleTestEvent","result","isPromise","Promise","resolve","finally","error","projectConfig","_ref","testEnvironmentOptions","resultsDir","restConfig","runtime","ReporterRuntime","writer","createDefaultWriter","testPath","relative","rootDir","testPlan","parseTestPlan","testRuntime","AllureJestTestRuntime","global","setGlobalTestRuntime","setup","teardown","handleAllureRuntimeMessage","message","executableUuid","last","runContext","applyRuntimeMessages","applyGlobalRuntimeMessages","_state","name","_handleHookStart","hook","_handleHookPass","_handleHookFail","_handleSuiteStart","_handleSuiteEnd","_handleTestScopeStart","_handleTestStart","test","_handleTestPass","_handleTestFail","_handleTestScopeStop","_handleTestSkip","_handleTestTodo","_handleRunFinish","_getTestFullName","testTitle","undefined","newTestSuitePath","getTestPath","parent","newTestPath","concat","newTestId","getTestId","projectName","getProjectName","fullNamePath","getPosixPath","fullNameBase","_startScope","_stopScope","shouldHookBeSkipped","scopeUuid","fixtureUuid","startFixture","type","pop","updateFixture","status","Status","PASSED","stage","Stage","FINISHED","stopFixture","BROKEN","getStatusFromError","statusDetails","getMessageAndTraceFromError","toGlobalErrorMessage","details","_test$startedAt","fsPath","split","sep","baseTitlePath","titlePath","cleanTitle","labels","links","extractMetadataFromString","legacyTestId","legacyFullName","newTestFullName","includedInTestPlan","fullName","tags","mode","testUuid","startTest","start","startedAt","RUNNING","getLanguageLabel","getFrameworkLabel","getPackageLabel","getFallbackTestCaseIdLabel","md5","getHostLabel","getThreadLabel","env","JEST_WORKER_ID","getEnvironmentLabels","getSuiteLabels","_tr","_tr2","_statusAndDetails","errors","tr","updateTest","writeTest","startScope","writeScope","_test$duration","_currentExecutable","suppressedErrors","expect","getState","statusAndDetails","stopTest","duration","_test$duration2","failing","FAILED","includes","SKIPPED","writeEnvironmentInfo","writeCategoriesDefinitions","hasMultipleErrors","Array","isArray","exception","firstError","_convertToError","secondError","stack","serialize","exports"],"sources":["../../src/environmentFactory.ts"],"sourcesContent":["import { relative, sep } from \"node:path\";\nimport { env } from \"node:process\";\n\nimport type { EnvironmentContext, JestEnvironment, JestEnvironmentConfig } from \"@jest/environment\";\nimport type { Circus } from \"@jest/types\";\nimport * as allure from \"allure-js-commons\";\nimport { Stage, Status, type StatusDetails, type TestResult } from \"allure-js-commons\";\nimport { type RuntimeMessage, type TestPlanV1, serialize } from \"allure-js-commons/sdk\";\nimport {\n extractMetadataFromString,\n getMessageAndTraceFromError,\n getStatusFromError,\n isPromise,\n toGlobalErrorMessage,\n} from \"allure-js-commons/sdk\";\nimport {\n ReporterRuntime,\n createDefaultWriter,\n getEnvironmentLabels,\n getFallbackTestCaseIdLabel,\n getFrameworkLabel,\n getHostLabel,\n getLanguageLabel,\n getPackageLabel,\n getPosixPath,\n getProjectName,\n getSuiteLabels,\n getThreadLabel,\n includedInTestPlan,\n md5,\n parseTestPlan,\n} from \"allure-js-commons/sdk/reporter\";\nimport { setGlobalTestRuntime } from \"allure-js-commons/sdk/runtime\";\n\nimport { AllureJestTestRuntime } from \"./AllureJestTestRuntime.js\";\nimport type { AllureJestConfig, AllureJestEnvironment, AllureJestProjectConfig, RunContext } from \"./model.js\";\nimport { getTestId, getTestPath, last, shouldHookBeSkipped } from \"./utils.js\";\n\ntype JestEnvironmentConstructor = new (...args: any[]) => any;\ntype JestEventHandler = NonNullable<JestEnvironment[\"handleTestEvent\"]>;\ntype CallableJestEventHandler = (event: any, state: Circus.State) => void | PromiseLike<void> | undefined;\n\nconst createJestEnvironment = <T extends JestEnvironmentConstructor>(Base: T): T => {\n // @ts-expect-error (ts(2545)) Incorrect assumption about a mixin class: https://github.com/microsoft/TypeScript/issues/37142\n return class extends Base {\n testPath: string;\n testPlan?: TestPlanV1;\n runtime: ReporterRuntime;\n runContext: RunContext = {\n executables: [],\n steps: [],\n scopes: [],\n skippedTestsFullNamesByTestPlan: [],\n };\n\n // config is AllureJestConfig in Jest v28 or greater. In older versions\n // it's AllureJestProjectConfig. See https://github.com/jestjs/jest/pull/12461\n constructor(config: AllureJestConfig | AllureJestProjectConfig, context: EnvironmentContext) {\n super(config as JestEnvironmentConfig, context);\n\n const handleTestEvent = this.handleTestEvent?.bind(this) as CallableJestEventHandler | undefined;\n\n // Preserve any event handler defined by the base or custom environment.\n this.handleTestEvent = ((event: any, state: Circus.State) => {\n const handleAllureEvent = () => this.#handleTestEvent(event as Circus.Event, state as Circus.State);\n\n // Keep Allure's lifecycle in sync even if the custom environment fails,\n // then rethrow the original error so Jest keeps its native behavior.\n try {\n const result = handleTestEvent?.(event, state);\n\n if (isPromise(result)) {\n return Promise.resolve(result).finally(handleAllureEvent);\n }\n } catch (error) {\n handleAllureEvent();\n throw error;\n }\n\n handleAllureEvent();\n }) as JestEventHandler;\n\n const projectConfig = \"projectConfig\" in config ? config.projectConfig : config;\n const { resultsDir, ...restConfig } = projectConfig?.testEnvironmentOptions || {};\n\n this.runtime = new ReporterRuntime({\n ...restConfig,\n writer: createDefaultWriter({ resultsDir }),\n });\n this.testPath = relative(projectConfig.rootDir, context.testPath);\n this.testPlan = parseTestPlan();\n\n // @ts-ignore\n const testRuntime = new AllureJestTestRuntime(this as AllureJestEnvironment, this.global);\n\n // @ts-ignore\n this.global.allure = allure;\n\n setGlobalTestRuntime(testRuntime);\n }\n\n setup() {\n return super.setup();\n }\n\n teardown() {\n return super.teardown();\n }\n\n handleAllureRuntimeMessage(message: RuntimeMessage) {\n const executableUuid = last(this.runContext.executables);\n if (executableUuid) {\n this.runtime.applyRuntimeMessages(executableUuid, [message]);\n } else {\n this.runtime.applyGlobalRuntimeMessages([message]);\n }\n }\n\n #handleTestEvent(event: Circus.Event, _state: Circus.State) {\n switch (event.name) {\n case \"hook_start\":\n this.#handleHookStart(event.hook);\n break;\n case \"hook_success\":\n this.#handleHookPass(event.hook);\n break;\n case \"hook_failure\":\n this.#handleHookFail(event.hook, event.error);\n break;\n case \"run_describe_start\":\n this.#handleSuiteStart();\n break;\n case \"run_describe_finish\":\n this.#handleSuiteEnd();\n break;\n case \"test_start\":\n this.#handleTestScopeStart();\n break;\n case \"test_fn_start\":\n this.#handleTestStart(event.test);\n break;\n case \"test_fn_success\":\n this.#handleTestPass(event.test);\n break;\n case \"test_fn_failure\":\n this.#handleTestFail(event.test);\n break;\n case \"test_done\":\n this.#handleTestScopeStop(event.test);\n break;\n case \"test_skip\":\n this.#handleTestSkip(event.test);\n break;\n case \"test_todo\":\n this.#handleTestTodo(event.test);\n break;\n case \"run_finish\":\n this.#handleRunFinish();\n break;\n default:\n break;\n }\n }\n\n #getTestFullName(test: Circus.TestEntry, testTitle: string = test.name) {\n const newTestSuitePath = getTestPath(test.parent);\n const newTestPath = newTestSuitePath.concat(testTitle);\n const newTestId = getTestId(newTestPath);\n\n const projectName = getProjectName();\n const fullNamePath = getPosixPath(this.testPath);\n const fullNameBase = projectName ? `${projectName}:${fullNamePath}` : fullNamePath;\n return `${fullNameBase}#${newTestId}`;\n }\n\n #handleSuiteStart() {\n this.#startScope();\n }\n\n #handleSuiteEnd() {\n this.#stopScope();\n }\n\n #handleHookStart(hook: Circus.Hook) {\n if (shouldHookBeSkipped(hook)) {\n return;\n }\n\n const scopeUuid = last(this.runContext.scopes);\n const fixtureUuid = this.runtime.startFixture(scopeUuid, /after/i.test(hook.type) ? \"after\" : \"before\", {\n name: hook.type,\n })!;\n\n this.runContext.executables.push(fixtureUuid);\n }\n\n #handleHookPass(hook: Circus.Hook) {\n if (shouldHookBeSkipped(hook)) {\n return;\n }\n\n const fixtureUuid = this.runContext.executables.pop()!;\n\n this.runtime.updateFixture(fixtureUuid, (r) => {\n r.status = Status.PASSED;\n r.stage = Stage.FINISHED;\n });\n this.runtime.stopFixture(fixtureUuid);\n }\n\n #handleHookFail(hook: Circus.Hook, error: string | Circus.Exception) {\n if (shouldHookBeSkipped(hook)) {\n return;\n }\n\n const fixtureUuid = this.runContext.executables.pop()!;\n const status = typeof error === \"string\" ? Status.BROKEN : getStatusFromError(error as Error);\n const statusDetails = typeof error === \"string\" ? { message: error } : getMessageAndTraceFromError(error);\n\n this.runtime.updateFixture(fixtureUuid, (r) => {\n r.status = status;\n r.statusDetails = statusDetails;\n r.stage = Stage.FINISHED;\n });\n this.runtime.applyGlobalRuntimeMessages([\n toGlobalErrorMessage({ name: hook.type, details: statusDetails, status }),\n ]);\n this.runtime.stopFixture(fixtureUuid);\n }\n\n #handleTestStart(test: Circus.TestEntry) {\n const fsPath = this.testPath.split(sep);\n const newTestSuitePath = getTestPath(test.parent);\n const projectName = getProjectName();\n const baseTitlePath = fsPath.concat(newTestSuitePath);\n const titlePath = projectName ? [projectName, ...baseTitlePath] : baseTitlePath;\n const { cleanTitle, labels, links } = extractMetadataFromString(test.name);\n const legacyTestId = getTestId(newTestSuitePath.concat(cleanTitle));\n const legacyFullName = `${getPosixPath(this.testPath)}#${legacyTestId}`;\n const newTestFullName = this.#getTestFullName(test, cleanTitle);\n\n if (this.testPlan && !includedInTestPlan(this.testPlan, { fullName: newTestFullName, tags: [test.name] })) {\n test.mode = \"skip\";\n this.runContext.skippedTestsFullNamesByTestPlan.push(newTestFullName);\n return;\n }\n\n const testUuid = this.runtime.startTest(\n {\n name: cleanTitle,\n fullName: newTestFullName,\n start: test.startedAt ?? undefined,\n stage: Stage.RUNNING,\n labels: [\n getLanguageLabel(),\n getFrameworkLabel(\"jest\"),\n getPackageLabel(this.testPath),\n getFallbackTestCaseIdLabel(md5(legacyFullName)),\n getHostLabel(),\n getThreadLabel(env.JEST_WORKER_ID),\n ...getEnvironmentLabels(),\n ...getSuiteLabels(newTestSuitePath),\n ...labels,\n ],\n titlePath,\n links,\n },\n this.runContext.scopes,\n );\n\n this.runContext.executables.push(testUuid);\n\n return testUuid;\n }\n\n #handleTestScopeStart() {\n this.#startScope();\n }\n\n #handleTestScopeStop(test: Circus.TestEntry) {\n const testUuid = this.runContext.executables.pop();\n\n if (testUuid) {\n const { status, details } = this.#statusAndDetails(test.errors);\n let tr: TestResult | undefined;\n this.runtime.updateTest(testUuid, (result) => {\n tr = result;\n });\n // hook failure, finish with the status reported by Jest\n if (tr?.status === undefined && tr?.stage === Stage.RUNNING) {\n this.runtime.updateTest(testUuid, (result) => {\n result.stage = Stage.FINISHED;\n result.status = status;\n result.statusDetails = {\n ...result.statusDetails,\n ...details,\n };\n });\n }\n\n this.runtime.writeTest(testUuid);\n }\n\n this.#stopScope();\n }\n\n #startScope() {\n const scopeUuid = this.runtime.startScope();\n\n this.runContext.scopes.push(scopeUuid);\n }\n\n #stopScope() {\n const scopeUuid = this.runContext.scopes.pop();\n if (!scopeUuid) {\n return;\n }\n\n this.runtime.writeScope(scopeUuid);\n }\n\n #handleTestPass(test: Circus.TestEntry) {\n const testUuid = this.#currentExecutable();\n\n if (!testUuid) {\n return;\n }\n // @ts-ignore\n const { suppressedErrors = [] } = this.global.expect.getState();\n const statusAndDetails = this.#statusAndDetails(suppressedErrors as Circus.TestError[]);\n\n this.runtime.updateTest(testUuid, (result) => {\n result.stage = Stage.FINISHED;\n result.status = statusAndDetails.status;\n result.statusDetails = {\n ...result.statusDetails,\n ...statusAndDetails.details,\n };\n });\n\n this.runtime.stopTest(testUuid, { duration: test.duration ?? 0 });\n }\n\n #handleTestFail(test: Circus.TestEntry) {\n const testUuid = this.#currentExecutable();\n\n if (!testUuid) {\n return;\n }\n\n const statusAndDetails = this.#statusAndDetails(test.errors);\n const status =\n test.failing && statusAndDetails.status === Status.BROKEN ? Status.FAILED : statusAndDetails.status;\n\n this.runtime.updateTest(testUuid, (result) => {\n result.stage = Stage.FINISHED;\n result.status = status;\n result.statusDetails = {\n ...result.statusDetails,\n ...statusAndDetails.details,\n };\n });\n this.runtime.stopTest(testUuid, { duration: test.duration ?? 0 });\n }\n\n #handleTestSkip(test: Circus.TestEntry) {\n const newTestFullName = this.#getTestFullName(test);\n\n if (this.runContext.skippedTestsFullNamesByTestPlan.includes(newTestFullName)) {\n return;\n }\n\n // noinspection JSPotentiallyInvalidUsageOfThis\n const testUuid = this.#handleTestStart(test);\n\n if (!testUuid) {\n return;\n }\n\n this.runtime.updateTest(testUuid, (result) => {\n result.stage = Stage.FINISHED;\n result.status = Status.SKIPPED;\n });\n // noinspection JSPotentiallyInvalidUsageOfThis\n this.#handleTestScopeStop(test);\n }\n\n #handleTestTodo(test: Circus.TestEntry) {\n // noinspection JSPotentiallyInvalidUsageOfThis\n const testUuid = this.#handleTestStart(test);\n if (!testUuid) {\n return;\n }\n\n this.runtime.updateTest(testUuid, (result) => {\n result.stage = Stage.FINISHED;\n result.status = Status.SKIPPED;\n result.statusDetails = {\n message: \"TODO\",\n };\n });\n // noinspection JSPotentiallyInvalidUsageOfThis\n this.#handleTestScopeStop(test);\n }\n\n #handleRunFinish() {\n this.runtime.writeEnvironmentInfo();\n this.runtime.writeCategoriesDefinitions();\n }\n\n #currentExecutable() {\n if (this.runContext.executables.length === 0) {\n return undefined;\n }\n return this.runContext.executables[this.runContext.executables.length - 1];\n }\n\n #statusAndDetails(errors: Circus.TestError[]): { status: Status; details: Partial<StatusDetails> } {\n if (errors.length === 0) {\n return {\n status: Status.PASSED,\n details: {},\n };\n }\n\n // jest collects all errors, but we need to report the first one because it's a reason why the test has been failed\n const [error] = errors;\n const hasMultipleErrors = Array.isArray(error);\n const exception: Circus.Exception = hasMultipleErrors ? error[0] : error;\n const firstError = this.#convertToError(exception);\n\n // in case user throws non-Error type, the first exception is the user-thrown object,\n // while the second one is provided by jest and has correct stack trace\n if (hasMultipleErrors && error.length > 1) {\n const secondError = this.#convertToError(error[1]);\n\n if (!firstError.message) {\n firstError.message = secondError.message;\n }\n\n if (!firstError.stack) {\n firstError.stack = secondError.stack;\n }\n }\n\n const details = getMessageAndTraceFromError(firstError);\n const status = getStatusFromError(firstError);\n\n return { status, details };\n }\n\n #convertToError(exception: Circus.Exception):\n | Error\n | {\n message?: string;\n stack?: string;\n } {\n if (!exception) {\n return {};\n }\n\n // user may throw an object as well\n if (typeof exception !== \"object\" || !(\"stack\" in exception)) {\n return {\n message: serialize(exception),\n };\n }\n\n return exception;\n }\n };\n};\n\nexport { createJestEnvironment };\n"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAIA,IAAAE,gBAAA,GAAAC,uBAAA,CAAAH,OAAA;AAA4C,IAAAI,MAAA,GAAAF,gBAAA;AAE5C,IAAAG,IAAA,GAAAL,OAAA;AAQA,IAAAM,SAAA,GAAAN,OAAA;AAiBA,IAAAO,QAAA,GAAAP,OAAA;AAEA,IAAAQ,sBAAA,GAAAR,OAAA;AAEA,IAAAS,MAAA,GAAAT,OAAA;AAA+E,IAAAU,SAAA;AAAA,SAAAP,wBAAAQ,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CA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;AAACM,OAAA,CAAA3K,qBAAA,GAAAA,qBAAA","ignoreList":[]}
1
+ {"version":3,"file":"environmentFactory.js","names":["_nodePath","require","_nodeProcess","_allureJsCommons","_interopRequireWildcard","allure","_sdk","_reporter","_runtime","_AllureJestTestRuntime","_utils","_excluded","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ownKeys","keys","getOwnPropertySymbols","filter","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","_objectWithoutProperties","_objectWithoutPropertiesLoose","indexOf","propertyIsEnumerable","_classPrivateMethodInitSpec","a","_checkPrivateRedeclaration","add","_classPrivateFieldInitSpec","TypeError","_toPropertyKey","value","configurable","writable","_toPrimitive","Symbol","toPrimitive","String","Number","_classPrivateFieldGet","s","_assertClassBrand","createJestEnvironment","Base","_testContexts","_Class_brand","WeakSet","constructor","config","context","_this$handleTestEvent","executables","steps","scopes","skippedTestsFullNamesByTestPlan","Map","handleTestEvent","bind","event","state","_this$global$expect$g","_this$global$expect","_this$global$expect$g2","_this$global$expect$g3","hookTest","name","global","expect","getState","currentTestIdentity","currentlyRunningTest","undefined","handleAllureEvent","_handleTestEvent","result","isPromise","Promise","resolve","finally","error","projectConfig","_ref","testEnvironmentOptions","resultsDir","restConfig","runtime","ReporterRuntime","writer","createDefaultWriter","testPath","relative","rootDir","testPlan","parseTestPlan","testRuntime","AllureJestTestRuntime","setGlobalTestRuntime","setup","teardown","handleAllureRuntimeMessage","message","_this$global$expect2","_context$fixtureUuid","_ref2","_last","getIdentity","identity","last","values","executableUuid","fixtureUuid","uuid","runContext","applyRuntimeMessages","applyGlobalRuntimeMessages","_handleHookStart","hook","_handleHookPass","test","_handleHookFail","_handleSuiteStart","_handleSuiteEnd","_handleTestScopeStart","_handleTestStart","_handleTestPass","_handleTestFail","_handleTestScopeStop","_handleTestSkip","_handleTestTodo","_handleRunFinish","_getTestFullName","testTitle","newTestSuitePath","getTestPath","parent","newTestPath","concat","newTestId","getTestId","projectName","getProjectName","fullNamePath","getPosixPath","fullNameBase","_startScope","_stopScope","_context$scopeUuid","shouldHookBeSkipped","type","endsWith","scopeUuid","startFixture","_context$fixtureUuid2","pop","updateFixture","status","Status","PASSED","stage","Stage","FINISHED","stopFixture","_context$fixtureUuid3","BROKEN","getStatusFromError","statusDetails","getMessageAndTraceFromError","toGlobalErrorMessage","details","_test$startedAt","fsPath","split","sep","baseTitlePath","titlePath","cleanTitle","labels","links","extractMetadataFromString","legacyTestId","legacyFullName","newTestFullName","includedInTestPlan","fullName","tags","mode","testUuid","startTest","start","startedAt","RUNNING","getLanguageLabel","getFrameworkLabel","getPackageLabel","getFallbackTestCaseIdLabel","md5","getHostLabel","getThreadLabel","env","JEST_WORKER_ID","getEnvironmentLabels","getSuiteLabels","startScope","_tr","_tr2","_statusAndDetails","errors","tr","updateTest","writeTest","writeScope","delete","_classPrivateFieldGet2","_test$duration","suppressedErrors","statusAndDetails","stopTest","duration","_classPrivateFieldGet3","_test$duration2","failing","FAILED","includes","SKIPPED","writeEnvironmentInfo","writeCategoriesDefinitions","hasMultipleErrors","Array","isArray","exception","firstError","_convertToError","secondError","stack","serialize","exports"],"sources":["../../src/environmentFactory.ts"],"sourcesContent":["import { relative, sep } from \"node:path\";\nimport { env } from \"node:process\";\n\nimport type { EnvironmentContext, JestEnvironment, JestEnvironmentConfig } from \"@jest/environment\";\nimport type { Circus } from \"@jest/types\";\nimport * as allure from \"allure-js-commons\";\nimport { Stage, Status, type StatusDetails, type TestResult } from \"allure-js-commons\";\nimport { type RuntimeMessage, type TestPlanV1, serialize } from \"allure-js-commons/sdk\";\nimport {\n extractMetadataFromString,\n getMessageAndTraceFromError,\n getStatusFromError,\n isPromise,\n toGlobalErrorMessage,\n} from \"allure-js-commons/sdk\";\nimport {\n ReporterRuntime,\n createDefaultWriter,\n getEnvironmentLabels,\n getFallbackTestCaseIdLabel,\n getFrameworkLabel,\n getHostLabel,\n getLanguageLabel,\n getPackageLabel,\n getPosixPath,\n getProjectName,\n getSuiteLabels,\n getThreadLabel,\n includedInTestPlan,\n md5,\n parseTestPlan,\n} from \"allure-js-commons/sdk/reporter\";\nimport { setGlobalTestRuntime } from \"allure-js-commons/sdk/runtime\";\n\nimport { AllureJestTestRuntime } from \"./AllureJestTestRuntime.js\";\nimport type { AllureJestConfig, AllureJestEnvironment, AllureJestProjectConfig, RunContext } from \"./model.js\";\nimport { getTestId, getTestPath, last, shouldHookBeSkipped } from \"./utils.js\";\n\ntype JestEnvironmentConstructor = new (...args: any[]) => any;\ntype JestEventHandler = NonNullable<JestEnvironment[\"handleTestEvent\"]>;\ntype CallableJestEventHandler = (event: any, state: Circus.State) => void | PromiseLike<void> | undefined;\n\ntype TestContext = {\n scopeUuid: string;\n uuid?: string;\n fixtureUuid?: string;\n};\n\nconst createJestEnvironment = <T extends JestEnvironmentConstructor>(Base: T): T => {\n // @ts-expect-error (ts(2545)) Incorrect assumption about a mixin class: https://github.com/microsoft/TypeScript/issues/37142\n return class extends Base {\n testPath: string;\n testPlan?: TestPlanV1;\n runtime: ReporterRuntime;\n runContext: RunContext = {\n executables: [],\n steps: [],\n scopes: [],\n skippedTestsFullNamesByTestPlan: [],\n };\n\n #testContexts = new Map<object, TestContext>();\n\n // config is AllureJestConfig in Jest v28 or greater. In older versions\n // it's AllureJestProjectConfig. See https://github.com/jestjs/jest/pull/12461\n constructor(config: AllureJestConfig | AllureJestProjectConfig, context: EnvironmentContext) {\n super(config as JestEnvironmentConfig, context);\n\n const handleTestEvent = this.handleTestEvent?.bind(this) as CallableJestEventHandler | undefined;\n\n // Preserve any event handler defined by the base or custom environment.\n this.handleTestEvent = ((event: any, state: Circus.State) => {\n // Capture the hook owner before a custom handler can yield or change\n // Circus's shared cursor. Runtime messages use the same native identity.\n const hookTest =\n event.name === \"hook_start\"\n ? (this.global.expect?.getState().currentTestIdentity?.() ?? state.currentlyRunningTest)\n : undefined;\n const handleAllureEvent = () => this.#handleTestEvent(event as Circus.Event, hookTest);\n\n // Keep Allure's lifecycle in sync even if the custom environment fails,\n // then rethrow the original error so Jest keeps its native behavior.\n try {\n const result = handleTestEvent?.(event, state);\n\n if (isPromise(result)) {\n return Promise.resolve(result).finally(handleAllureEvent);\n }\n } catch (error) {\n handleAllureEvent();\n throw error;\n }\n\n handleAllureEvent();\n }) as JestEventHandler;\n\n const projectConfig = \"projectConfig\" in config ? config.projectConfig : config;\n const { resultsDir, ...restConfig } = projectConfig?.testEnvironmentOptions || {};\n\n this.runtime = new ReporterRuntime({\n ...restConfig,\n writer: createDefaultWriter({ resultsDir }),\n });\n this.testPath = relative(projectConfig.rootDir, context.testPath);\n this.testPlan = parseTestPlan();\n\n // @ts-ignore\n const testRuntime = new AllureJestTestRuntime(this as AllureJestEnvironment, this.global);\n\n // @ts-ignore\n this.global.allure = allure;\n\n setGlobalTestRuntime(testRuntime);\n }\n\n setup() {\n return super.setup();\n }\n\n teardown() {\n return super.teardown();\n }\n\n handleAllureRuntimeMessage(message: RuntimeMessage) {\n const getIdentity: (() => object | undefined) | undefined = this.global.expect?.getState().currentTestIdentity;\n const identity = getIdentity?.();\n const context = getIdentity\n ? identity && this.#testContexts.get(identity)\n : last([...this.#testContexts.values()]);\n const executableUuid =\n getIdentity && identity\n ? (context?.fixtureUuid ?? context?.uuid)\n : (last(this.runContext.executables) ?? context?.fixtureUuid ?? context?.uuid);\n if (executableUuid) {\n this.runtime.applyRuntimeMessages(executableUuid, [message]);\n } else {\n this.runtime.applyGlobalRuntimeMessages([message]);\n }\n }\n\n #handleTestEvent(event: Circus.Event, hookTest?: Circus.TestEntry | null) {\n switch (event.name) {\n case \"hook_start\":\n this.#handleHookStart(event.hook, hookTest);\n break;\n case \"hook_success\":\n this.#handleHookPass(event.hook, event.test);\n break;\n case \"hook_failure\":\n this.#handleHookFail(event.hook, event.error, event.test);\n break;\n case \"run_describe_start\":\n this.#handleSuiteStart();\n break;\n case \"run_describe_finish\":\n this.#handleSuiteEnd();\n break;\n case \"test_start\":\n this.#handleTestScopeStart(event.test);\n break;\n case \"test_fn_start\":\n this.#handleTestStart(event.test);\n break;\n case \"test_fn_success\":\n this.#handleTestPass(event.test);\n break;\n case \"test_fn_failure\":\n this.#handleTestFail(event.test);\n break;\n case \"test_done\":\n this.#handleTestScopeStop(event.test);\n break;\n case \"test_skip\":\n this.#handleTestSkip(event.test);\n break;\n case \"test_todo\":\n this.#handleTestTodo(event.test);\n break;\n case \"run_finish\":\n this.#handleRunFinish();\n break;\n default:\n break;\n }\n }\n\n #getTestFullName(test: Circus.TestEntry, testTitle: string = test.name) {\n const newTestSuitePath = getTestPath(test.parent);\n const newTestPath = newTestSuitePath.concat(testTitle);\n const newTestId = getTestId(newTestPath);\n\n const projectName = getProjectName();\n const fullNamePath = getPosixPath(this.testPath);\n const fullNameBase = projectName ? `${projectName}:${fullNamePath}` : fullNamePath;\n return `${fullNameBase}#${newTestId}`;\n }\n\n #handleSuiteStart() {\n this.#startScope();\n }\n\n #handleSuiteEnd() {\n this.#stopScope();\n }\n\n #handleHookStart(hook: Circus.Hook, test?: Circus.TestEntry | null) {\n if (shouldHookBeSkipped(hook)) {\n return;\n }\n\n const context = test && hook.type.endsWith(\"Each\") ? this.#testContexts.get(test) : undefined;\n const scopeUuid = context?.scopeUuid ?? last(this.runContext.scopes);\n const fixtureUuid = this.runtime.startFixture(scopeUuid, /after/i.test(hook.type) ? \"after\" : \"before\", {\n name: hook.type,\n })!;\n\n if (context) {\n context.fixtureUuid = fixtureUuid;\n } else {\n this.runContext.executables.push(fixtureUuid);\n }\n }\n\n #handleHookPass(hook: Circus.Hook, test?: Circus.TestEntry) {\n if (shouldHookBeSkipped(hook)) {\n return;\n }\n\n const context = test ? this.#testContexts.get(test) : undefined;\n const fixtureUuid = context?.fixtureUuid ?? this.runContext.executables.pop()!;\n if (context) {\n delete context.fixtureUuid;\n }\n\n this.runtime.updateFixture(fixtureUuid, (r) => {\n r.status = Status.PASSED;\n r.stage = Stage.FINISHED;\n });\n this.runtime.stopFixture(fixtureUuid);\n }\n\n #handleHookFail(hook: Circus.Hook, error: Circus.Exception, test?: Circus.TestEntry) {\n if (shouldHookBeSkipped(hook)) {\n return;\n }\n\n const context = test ? this.#testContexts.get(test) : undefined;\n const fixtureUuid = context?.fixtureUuid ?? this.runContext.executables.pop()!;\n if (context) {\n delete context.fixtureUuid;\n }\n const status = typeof error === \"string\" ? Status.BROKEN : getStatusFromError(error as Error);\n const statusDetails = typeof error === \"string\" ? { message: error } : getMessageAndTraceFromError(error);\n\n this.runtime.updateFixture(fixtureUuid, (r) => {\n r.status = status;\n r.statusDetails = statusDetails;\n r.stage = Stage.FINISHED;\n });\n this.runtime.applyGlobalRuntimeMessages([\n toGlobalErrorMessage({ name: hook.type, details: statusDetails, status }),\n ]);\n this.runtime.stopFixture(fixtureUuid);\n }\n\n #handleTestStart(test: Circus.TestEntry) {\n const fsPath = this.testPath.split(sep);\n const newTestSuitePath = getTestPath(test.parent);\n const projectName = getProjectName();\n const baseTitlePath = fsPath.concat(newTestSuitePath);\n const titlePath = projectName ? [projectName, ...baseTitlePath] : baseTitlePath;\n const { cleanTitle, labels, links } = extractMetadataFromString(test.name);\n const legacyTestId = getTestId(newTestSuitePath.concat(cleanTitle));\n const legacyFullName = `${getPosixPath(this.testPath)}#${legacyTestId}`;\n const newTestFullName = this.#getTestFullName(test, cleanTitle);\n\n if (this.testPlan && !includedInTestPlan(this.testPlan, { fullName: newTestFullName, tags: [test.name] })) {\n test.mode = \"skip\";\n this.runContext.skippedTestsFullNamesByTestPlan.push(newTestFullName);\n return;\n }\n\n const context = this.#handleTestScopeStart(test);\n const testUuid = this.runtime.startTest(\n {\n name: cleanTitle,\n fullName: newTestFullName,\n start: test.startedAt ?? undefined,\n stage: Stage.RUNNING,\n labels: [\n getLanguageLabel(),\n getFrameworkLabel(\"jest\"),\n getPackageLabel(this.testPath),\n getFallbackTestCaseIdLabel(md5(legacyFullName)),\n getHostLabel(),\n getThreadLabel(env.JEST_WORKER_ID),\n ...getEnvironmentLabels(),\n ...getSuiteLabels(newTestSuitePath),\n ...labels,\n ],\n titlePath,\n links,\n },\n [...this.runContext.scopes, context.scopeUuid],\n );\n\n context.uuid = testUuid;\n\n return testUuid;\n }\n\n #handleTestScopeStart(test: Circus.TestEntry) {\n let context = this.#testContexts.get(test);\n if (!context) {\n context = { scopeUuid: this.runtime.startScope() };\n this.#testContexts.set(test, context);\n }\n return context;\n }\n\n #handleTestScopeStop(test: Circus.TestEntry) {\n const context = this.#testContexts.get(test);\n const testUuid = context?.uuid;\n\n if (testUuid) {\n const { status, details } = this.#statusAndDetails(test.errors);\n let tr: TestResult | undefined;\n this.runtime.updateTest(testUuid, (result) => {\n tr = result;\n });\n // hook failure, finish with the status reported by Jest\n if (tr?.status === undefined && tr?.stage === Stage.RUNNING) {\n this.runtime.updateTest(testUuid, (result) => {\n result.stage = Stage.FINISHED;\n result.status = status;\n result.statusDetails = {\n ...result.statusDetails,\n ...details,\n };\n });\n }\n\n this.runtime.writeTest(testUuid);\n }\n\n if (context) {\n this.runtime.writeScope(context.scopeUuid);\n this.#testContexts.delete(test);\n }\n }\n\n #startScope() {\n const scopeUuid = this.runtime.startScope();\n\n this.runContext.scopes.push(scopeUuid);\n }\n\n #stopScope() {\n const scopeUuid = this.runContext.scopes.pop();\n if (!scopeUuid) {\n return;\n }\n\n this.runtime.writeScope(scopeUuid);\n }\n\n #handleTestPass(test: Circus.TestEntry) {\n const testUuid = this.#testContexts.get(test)?.uuid;\n\n if (!testUuid) {\n return;\n }\n // @ts-ignore\n const { suppressedErrors = [] } = this.global.expect.getState();\n const statusAndDetails = this.#statusAndDetails(suppressedErrors as Circus.TestError[]);\n\n this.runtime.updateTest(testUuid, (result) => {\n result.stage = Stage.FINISHED;\n result.status = statusAndDetails.status;\n result.statusDetails = {\n ...result.statusDetails,\n ...statusAndDetails.details,\n };\n });\n\n this.runtime.stopTest(testUuid, { duration: test.duration ?? 0 });\n }\n\n #handleTestFail(test: Circus.TestEntry) {\n const testUuid = this.#testContexts.get(test)?.uuid;\n\n if (!testUuid) {\n return;\n }\n\n const statusAndDetails = this.#statusAndDetails(test.errors);\n const status =\n test.failing && statusAndDetails.status === Status.BROKEN ? Status.FAILED : statusAndDetails.status;\n\n this.runtime.updateTest(testUuid, (result) => {\n result.stage = Stage.FINISHED;\n result.status = status;\n result.statusDetails = {\n ...result.statusDetails,\n ...statusAndDetails.details,\n };\n });\n this.runtime.stopTest(testUuid, { duration: test.duration ?? 0 });\n }\n\n #handleTestSkip(test: Circus.TestEntry) {\n const newTestFullName = this.#getTestFullName(test);\n\n if (this.runContext.skippedTestsFullNamesByTestPlan.includes(newTestFullName)) {\n this.#handleTestScopeStop(test);\n return;\n }\n\n // noinspection JSPotentiallyInvalidUsageOfThis\n const testUuid = this.#handleTestStart(test);\n\n if (!testUuid) {\n return;\n }\n\n this.runtime.updateTest(testUuid, (result) => {\n result.stage = Stage.FINISHED;\n result.status = Status.SKIPPED;\n });\n // noinspection JSPotentiallyInvalidUsageOfThis\n this.#handleTestScopeStop(test);\n }\n\n #handleTestTodo(test: Circus.TestEntry) {\n // noinspection JSPotentiallyInvalidUsageOfThis\n const testUuid = this.#handleTestStart(test);\n if (!testUuid) {\n return;\n }\n\n this.runtime.updateTest(testUuid, (result) => {\n result.stage = Stage.FINISHED;\n result.status = Status.SKIPPED;\n result.statusDetails = {\n message: \"TODO\",\n };\n });\n // noinspection JSPotentiallyInvalidUsageOfThis\n this.#handleTestScopeStop(test);\n }\n\n #handleRunFinish() {\n this.runtime.writeEnvironmentInfo();\n this.runtime.writeCategoriesDefinitions();\n }\n\n #statusAndDetails(errors: Circus.TestError[]): { status: Status; details: Partial<StatusDetails> } {\n if (errors.length === 0) {\n return {\n status: Status.PASSED,\n details: {},\n };\n }\n\n // jest collects all errors, but we need to report the first one because it's a reason why the test has been failed\n const [error] = errors;\n const hasMultipleErrors = Array.isArray(error);\n const exception: Circus.Exception = hasMultipleErrors ? error[0] : error;\n const firstError = this.#convertToError(exception);\n\n // in case user throws non-Error type, the first exception is the user-thrown object,\n // while the second one is provided by jest and has correct stack trace\n if (hasMultipleErrors && error.length > 1) {\n const secondError = this.#convertToError(error[1]);\n\n if (!firstError.message) {\n firstError.message = secondError.message;\n }\n\n if (!firstError.stack) {\n firstError.stack = secondError.stack;\n }\n }\n\n const details = getMessageAndTraceFromError(firstError);\n const status = getStatusFromError(firstError);\n\n return { status, details };\n }\n\n #convertToError(exception: Circus.Exception):\n | Error\n | {\n message?: string;\n stack?: string;\n } {\n if (!exception) {\n return {};\n }\n\n // user may throw an object as well\n if (typeof exception !== \"object\" || !(\"stack\" in exception)) {\n return {\n message: serialize(exception),\n };\n }\n\n return exception;\n }\n };\n};\n\nexport { createJestEnvironment };\n"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAIA,IAAAE,gBAAA,GAAAC,uBAAA,CAAAH,OAAA;AAA4C,IAAAI,MAAA,GAAAF,gBAAA;AAE5C,IAAAG,IAAA,GAAAL,OAAA;AAQA,IAAAM,SAAA,GAAAN,OAAA;AAiBA,IAAAO,QAAA,GAAAP,OAAA;AAEA,IAAAQ,sBAAA,GAAAR,OAAA;AAEA,IAAAS,MAAA,GAAAT,OAAA;AAA+E,IAAAU,SAAA;AAAA,SAAAP,wBAAAQ,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAV,uBAAA,YAAAA,wBAAAQ,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA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EAAC0L,eAAc,CAAC,CAAArO,IAAA,CAApB,IAAI,EAAiB6E,KAAK,CAAC,CAAC,CAAC,CAAC;MAElD,IAAI,CAACuJ,UAAU,CAAClI,OAAO,EAAE;QACvBkI,UAAU,CAAClI,OAAO,GAAGoI,WAAW,CAACpI,OAAO;MAC1C;MAEA,IAAI,CAACkI,UAAU,CAACG,KAAK,EAAE;QACrBH,UAAU,CAACG,KAAK,GAAGD,WAAW,CAACC,KAAK;MACtC;IACF;IAEA,IAAMjE,OAAO,GAAG,IAAAF,gCAA2B,EAACgE,UAAU,CAAC;IACvD,IAAM3E,MAAM,GAAG,IAAAS,uBAAkB,EAACkE,UAAU,CAAC;IAE7C,OAAO;MAAE3E,MAAM;MAAEa;IAAQ,CAAC;EAC5B;EAAC,SAAA+D,gBAEeF,SAA2B,EAKrC;IACJ,IAAI,CAACA,SAAS,EAAE;MACd,OAAO,CAAC,CAAC;IACX;;IAEA;IACA,IAAI,OAAOA,SAAS,KAAK,QAAQ,IAAI,EAAE,OAAO,IAAIA,SAAS,CAAC,EAAE;MAC5D,OAAO;QACLjI,OAAO,EAAE,IAAAsI,cAAS,EAACL,SAAS;MAC9B,CAAC;IACH;IAEA,OAAOA,SAAS;EAClB;AAEJ,CAAC;AAACM,OAAA,CAAAjM,qBAAA,GAAAA,qBAAA","ignoreList":[]}
@@ -4,10 +4,12 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
4
4
  function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
5
5
  function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
6
6
  function _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }
7
+ function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
7
8
  function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
8
9
  function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
9
10
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
10
11
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
12
+ function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
11
13
  function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
12
14
  import { relative, sep } from "node:path";
13
15
  import { env } from "node:process";
@@ -20,14 +22,14 @@ import { setGlobalTestRuntime } from "allure-js-commons/sdk/runtime";
20
22
  import { AllureJestTestRuntime } from "./AllureJestTestRuntime.js";
21
23
  import { getTestId, getTestPath, last, shouldHookBeSkipped } from "./utils.js";
22
24
  var createJestEnvironment = Base => {
23
- var _Class_brand;
25
+ var _testContexts, _Class_brand;
24
26
  // @ts-expect-error (ts(2545)) Incorrect assumption about a mixin class: https://github.com/microsoft/TypeScript/issues/37142
25
- return _Class_brand = /*#__PURE__*/new WeakSet(), class extends Base {
27
+ return _testContexts = /*#__PURE__*/new WeakMap(), _Class_brand = /*#__PURE__*/new WeakSet(), class extends Base {
26
28
  // config is AllureJestConfig in Jest v28 or greater. In older versions
27
29
  // it's AllureJestProjectConfig. See https://github.com/jestjs/jest/pull/12461
28
- constructor(config, context) {
30
+ constructor(config, _context) {
29
31
  var _this$handleTestEvent;
30
- super(config, context);
32
+ super(config, _context);
31
33
  _classPrivateMethodInitSpec(this, _Class_brand);
32
34
  _defineProperty(this, "testPath", void 0);
33
35
  _defineProperty(this, "testPlan", void 0);
@@ -38,11 +40,16 @@ var createJestEnvironment = Base => {
38
40
  scopes: [],
39
41
  skippedTestsFullNamesByTestPlan: []
40
42
  });
43
+ _classPrivateFieldInitSpec(this, _testContexts, new Map());
41
44
  var handleTestEvent = (_this$handleTestEvent = this.handleTestEvent) === null || _this$handleTestEvent === void 0 ? void 0 : _this$handleTestEvent.bind(this);
42
45
 
43
46
  // Preserve any event handler defined by the base or custom environment.
44
47
  this.handleTestEvent = (event, state) => {
45
- var handleAllureEvent = () => _assertClassBrand(_Class_brand, this, _handleTestEvent).call(this, event, state);
48
+ var _this$global$expect$g, _this$global$expect, _this$global$expect$g2, _this$global$expect$g3;
49
+ // Capture the hook owner before a custom handler can yield or change
50
+ // Circus's shared cursor. Runtime messages use the same native identity.
51
+ var hookTest = event.name === "hook_start" ? (_this$global$expect$g = (_this$global$expect = this.global.expect) === null || _this$global$expect === void 0 || (_this$global$expect$g2 = (_this$global$expect$g3 = _this$global$expect.getState()).currentTestIdentity) === null || _this$global$expect$g2 === void 0 ? void 0 : _this$global$expect$g2.call(_this$global$expect$g3)) !== null && _this$global$expect$g !== void 0 ? _this$global$expect$g : state.currentlyRunningTest : undefined;
52
+ var handleAllureEvent = () => _assertClassBrand(_Class_brand, this, _handleTestEvent).call(this, event, hookTest);
46
53
 
47
54
  // Keep Allure's lifecycle in sync even if the custom environment fails,
48
55
  // then rethrow the original error so Jest keeps its native behavior.
@@ -68,7 +75,7 @@ var createJestEnvironment = Base => {
68
75
  resultsDir
69
76
  })
70
77
  }));
71
- this.testPath = relative(projectConfig.rootDir, context.testPath);
78
+ this.testPath = relative(projectConfig.rootDir, _context.testPath);
72
79
  this.testPlan = parseTestPlan();
73
80
 
74
81
  // @ts-ignore
@@ -85,7 +92,11 @@ var createJestEnvironment = Base => {
85
92
  return super.teardown();
86
93
  }
87
94
  handleAllureRuntimeMessage(message) {
88
- var executableUuid = last(this.runContext.executables);
95
+ var _this$global$expect2, _context$fixtureUuid, _ref2, _last;
96
+ var getIdentity = (_this$global$expect2 = this.global.expect) === null || _this$global$expect2 === void 0 ? void 0 : _this$global$expect2.getState().currentTestIdentity;
97
+ var identity = getIdentity === null || getIdentity === void 0 ? void 0 : getIdentity();
98
+ var context = getIdentity ? identity && _classPrivateFieldGet(_testContexts, this).get(identity) : last([..._classPrivateFieldGet(_testContexts, this).values()]);
99
+ var executableUuid = getIdentity && identity ? (_context$fixtureUuid = context === null || context === void 0 ? void 0 : context.fixtureUuid) !== null && _context$fixtureUuid !== void 0 ? _context$fixtureUuid : context === null || context === void 0 ? void 0 : context.uuid : (_ref2 = (_last = last(this.runContext.executables)) !== null && _last !== void 0 ? _last : context === null || context === void 0 ? void 0 : context.fixtureUuid) !== null && _ref2 !== void 0 ? _ref2 : context === null || context === void 0 ? void 0 : context.uuid;
89
100
  if (executableUuid) {
90
101
  this.runtime.applyRuntimeMessages(executableUuid, [message]);
91
102
  } else {
@@ -93,16 +104,16 @@ var createJestEnvironment = Base => {
93
104
  }
94
105
  }
95
106
  };
96
- function _handleTestEvent(event, _state) {
107
+ function _handleTestEvent(event, hookTest) {
97
108
  switch (event.name) {
98
109
  case "hook_start":
99
- _assertClassBrand(_Class_brand, this, _handleHookStart).call(this, event.hook);
110
+ _assertClassBrand(_Class_brand, this, _handleHookStart).call(this, event.hook, hookTest);
100
111
  break;
101
112
  case "hook_success":
102
- _assertClassBrand(_Class_brand, this, _handleHookPass).call(this, event.hook);
113
+ _assertClassBrand(_Class_brand, this, _handleHookPass).call(this, event.hook, event.test);
103
114
  break;
104
115
  case "hook_failure":
105
- _assertClassBrand(_Class_brand, this, _handleHookFail).call(this, event.hook, event.error);
116
+ _assertClassBrand(_Class_brand, this, _handleHookFail).call(this, event.hook, event.error, event.test);
106
117
  break;
107
118
  case "run_describe_start":
108
119
  _assertClassBrand(_Class_brand, this, _handleSuiteStart).call(this);
@@ -111,7 +122,7 @@ var createJestEnvironment = Base => {
111
122
  _assertClassBrand(_Class_brand, this, _handleSuiteEnd).call(this);
112
123
  break;
113
124
  case "test_start":
114
- _assertClassBrand(_Class_brand, this, _handleTestScopeStart).call(this);
125
+ _assertClassBrand(_Class_brand, this, _handleTestScopeStart).call(this, event.test);
115
126
  break;
116
127
  case "test_fn_start":
117
128
  _assertClassBrand(_Class_brand, this, _handleTestStart).call(this, event.test);
@@ -154,32 +165,48 @@ var createJestEnvironment = Base => {
154
165
  function _handleSuiteEnd() {
155
166
  _assertClassBrand(_Class_brand, this, _stopScope).call(this);
156
167
  }
157
- function _handleHookStart(hook) {
168
+ function _handleHookStart(hook, test) {
169
+ var _context$scopeUuid;
158
170
  if (shouldHookBeSkipped(hook)) {
159
171
  return;
160
172
  }
161
- var scopeUuid = last(this.runContext.scopes);
173
+ var context = test && hook.type.endsWith("Each") ? _classPrivateFieldGet(_testContexts, this).get(test) : undefined;
174
+ var scopeUuid = (_context$scopeUuid = context === null || context === void 0 ? void 0 : context.scopeUuid) !== null && _context$scopeUuid !== void 0 ? _context$scopeUuid : last(this.runContext.scopes);
162
175
  var fixtureUuid = this.runtime.startFixture(scopeUuid, /after/i.test(hook.type) ? "after" : "before", {
163
176
  name: hook.type
164
177
  });
165
- this.runContext.executables.push(fixtureUuid);
178
+ if (context) {
179
+ context.fixtureUuid = fixtureUuid;
180
+ } else {
181
+ this.runContext.executables.push(fixtureUuid);
182
+ }
166
183
  }
167
- function _handleHookPass(hook) {
184
+ function _handleHookPass(hook, test) {
185
+ var _context$fixtureUuid2;
168
186
  if (shouldHookBeSkipped(hook)) {
169
187
  return;
170
188
  }
171
- var fixtureUuid = this.runContext.executables.pop();
189
+ var context = test ? _classPrivateFieldGet(_testContexts, this).get(test) : undefined;
190
+ var fixtureUuid = (_context$fixtureUuid2 = context === null || context === void 0 ? void 0 : context.fixtureUuid) !== null && _context$fixtureUuid2 !== void 0 ? _context$fixtureUuid2 : this.runContext.executables.pop();
191
+ if (context) {
192
+ delete context.fixtureUuid;
193
+ }
172
194
  this.runtime.updateFixture(fixtureUuid, r => {
173
195
  r.status = Status.PASSED;
174
196
  r.stage = Stage.FINISHED;
175
197
  });
176
198
  this.runtime.stopFixture(fixtureUuid);
177
199
  }
178
- function _handleHookFail(hook, error) {
200
+ function _handleHookFail(hook, error, test) {
201
+ var _context$fixtureUuid3;
179
202
  if (shouldHookBeSkipped(hook)) {
180
203
  return;
181
204
  }
182
- var fixtureUuid = this.runContext.executables.pop();
205
+ var context = test ? _classPrivateFieldGet(_testContexts, this).get(test) : undefined;
206
+ var fixtureUuid = (_context$fixtureUuid3 = context === null || context === void 0 ? void 0 : context.fixtureUuid) !== null && _context$fixtureUuid3 !== void 0 ? _context$fixtureUuid3 : this.runContext.executables.pop();
207
+ if (context) {
208
+ delete context.fixtureUuid;
209
+ }
183
210
  var status = typeof error === "string" ? Status.BROKEN : getStatusFromError(error);
184
211
  var statusDetails = typeof error === "string" ? {
185
212
  message: error
@@ -219,6 +246,7 @@ var createJestEnvironment = Base => {
219
246
  this.runContext.skippedTestsFullNamesByTestPlan.push(newTestFullName);
220
247
  return;
221
248
  }
249
+ var context = _assertClassBrand(_Class_brand, this, _handleTestScopeStart).call(this, test);
222
250
  var testUuid = this.runtime.startTest({
223
251
  name: cleanTitle,
224
252
  fullName: newTestFullName,
@@ -227,15 +255,23 @@ var createJestEnvironment = Base => {
227
255
  labels: [getLanguageLabel(), getFrameworkLabel("jest"), getPackageLabel(this.testPath), getFallbackTestCaseIdLabel(md5(legacyFullName)), getHostLabel(), getThreadLabel(env.JEST_WORKER_ID), ...getEnvironmentLabels(), ...getSuiteLabels(newTestSuitePath), ...labels],
228
256
  titlePath,
229
257
  links
230
- }, this.runContext.scopes);
231
- this.runContext.executables.push(testUuid);
258
+ }, [...this.runContext.scopes, context.scopeUuid]);
259
+ context.uuid = testUuid;
232
260
  return testUuid;
233
261
  }
234
- function _handleTestScopeStart() {
235
- _assertClassBrand(_Class_brand, this, _startScope).call(this);
262
+ function _handleTestScopeStart(test) {
263
+ var context = _classPrivateFieldGet(_testContexts, this).get(test);
264
+ if (!context) {
265
+ context = {
266
+ scopeUuid: this.runtime.startScope()
267
+ };
268
+ _classPrivateFieldGet(_testContexts, this).set(test, context);
269
+ }
270
+ return context;
236
271
  }
237
272
  function _handleTestScopeStop(test) {
238
- var testUuid = this.runContext.executables.pop();
273
+ var context = _classPrivateFieldGet(_testContexts, this).get(test);
274
+ var testUuid = context === null || context === void 0 ? void 0 : context.uuid;
239
275
  if (testUuid) {
240
276
  var _tr, _tr2;
241
277
  var {
@@ -256,7 +292,10 @@ var createJestEnvironment = Base => {
256
292
  }
257
293
  this.runtime.writeTest(testUuid);
258
294
  }
259
- _assertClassBrand(_Class_brand, this, _stopScope).call(this);
295
+ if (context) {
296
+ this.runtime.writeScope(context.scopeUuid);
297
+ _classPrivateFieldGet(_testContexts, this).delete(test);
298
+ }
260
299
  }
261
300
  function _startScope() {
262
301
  var scopeUuid = this.runtime.startScope();
@@ -270,8 +309,8 @@ var createJestEnvironment = Base => {
270
309
  this.runtime.writeScope(scopeUuid);
271
310
  }
272
311
  function _handleTestPass(test) {
273
- var _test$duration;
274
- var testUuid = _assertClassBrand(_Class_brand, this, _currentExecutable).call(this);
312
+ var _classPrivateFieldGet2, _test$duration;
313
+ var testUuid = (_classPrivateFieldGet2 = _classPrivateFieldGet(_testContexts, this).get(test)) === null || _classPrivateFieldGet2 === void 0 ? void 0 : _classPrivateFieldGet2.uuid;
275
314
  if (!testUuid) {
276
315
  return;
277
316
  }
@@ -290,8 +329,8 @@ var createJestEnvironment = Base => {
290
329
  });
291
330
  }
292
331
  function _handleTestFail(test) {
293
- var _test$duration2;
294
- var testUuid = _assertClassBrand(_Class_brand, this, _currentExecutable).call(this);
332
+ var _classPrivateFieldGet3, _test$duration2;
333
+ var testUuid = (_classPrivateFieldGet3 = _classPrivateFieldGet(_testContexts, this).get(test)) === null || _classPrivateFieldGet3 === void 0 ? void 0 : _classPrivateFieldGet3.uuid;
295
334
  if (!testUuid) {
296
335
  return;
297
336
  }
@@ -309,6 +348,7 @@ var createJestEnvironment = Base => {
309
348
  function _handleTestSkip(test) {
310
349
  var newTestFullName = _assertClassBrand(_Class_brand, this, _getTestFullName).call(this, test);
311
350
  if (this.runContext.skippedTestsFullNamesByTestPlan.includes(newTestFullName)) {
351
+ _assertClassBrand(_Class_brand, this, _handleTestScopeStop).call(this, test);
312
352
  return;
313
353
  }
314
354
 
@@ -344,12 +384,6 @@ var createJestEnvironment = Base => {
344
384
  this.runtime.writeEnvironmentInfo();
345
385
  this.runtime.writeCategoriesDefinitions();
346
386
  }
347
- function _currentExecutable() {
348
- if (this.runContext.executables.length === 0) {
349
- return undefined;
350
- }
351
- return this.runContext.executables[this.runContext.executables.length - 1];
352
- }
353
387
  function _statusAndDetails(errors) {
354
388
  if (errors.length === 0) {
355
389
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"environmentFactory.js","names":["relative","sep","env","allure","Stage","Status","serialize","extractMetadataFromString","getMessageAndTraceFromError","getStatusFromError","isPromise","toGlobalErrorMessage","ReporterRuntime","createDefaultWriter","getEnvironmentLabels","getFallbackTestCaseIdLabel","getFrameworkLabel","getHostLabel","getLanguageLabel","getPackageLabel","getPosixPath","getProjectName","getSuiteLabels","getThreadLabel","includedInTestPlan","md5","parseTestPlan","setGlobalTestRuntime","AllureJestTestRuntime","getTestId","getTestPath","last","shouldHookBeSkipped","createJestEnvironment","Base","_Class_brand","WeakSet","constructor","config","context","_this$handleTestEvent","_classPrivateMethodInitSpec","_defineProperty","executables","steps","scopes","skippedTestsFullNamesByTestPlan","handleTestEvent","bind","event","state","handleAllureEvent","_assertClassBrand","_handleTestEvent","call","result","Promise","resolve","finally","error","projectConfig","_ref","testEnvironmentOptions","resultsDir","restConfig","_objectWithoutProperties","_excluded","runtime","_objectSpread","writer","testPath","rootDir","testPlan","testRuntime","global","setup","teardown","handleAllureRuntimeMessage","message","executableUuid","runContext","applyRuntimeMessages","applyGlobalRuntimeMessages","_state","name","_handleHookStart","hook","_handleHookPass","_handleHookFail","_handleSuiteStart","_handleSuiteEnd","_handleTestScopeStart","_handleTestStart","test","_handleTestPass","_handleTestFail","_handleTestScopeStop","_handleTestSkip","_handleTestTodo","_handleRunFinish","_getTestFullName","testTitle","arguments","length","undefined","newTestSuitePath","parent","newTestPath","concat","newTestId","projectName","fullNamePath","fullNameBase","_startScope","_stopScope","scopeUuid","fixtureUuid","startFixture","type","push","pop","updateFixture","r","status","PASSED","stage","FINISHED","stopFixture","BROKEN","statusDetails","details","_test$startedAt","fsPath","split","baseTitlePath","titlePath","cleanTitle","labels","links","legacyTestId","legacyFullName","newTestFullName","fullName","tags","mode","testUuid","startTest","start","startedAt","RUNNING","JEST_WORKER_ID","_tr","_tr2","_statusAndDetails","errors","tr","updateTest","writeTest","startScope","writeScope","_test$duration","_currentExecutable","suppressedErrors","expect","getState","statusAndDetails","stopTest","duration","_test$duration2","failing","FAILED","includes","SKIPPED","writeEnvironmentInfo","writeCategoriesDefinitions","hasMultipleErrors","Array","isArray","exception","firstError","_convertToError","secondError","stack"],"sources":["../../src/environmentFactory.ts"],"sourcesContent":["import { relative, sep } from \"node:path\";\nimport { env } from \"node:process\";\n\nimport type { EnvironmentContext, JestEnvironment, JestEnvironmentConfig } from \"@jest/environment\";\nimport type { Circus } from \"@jest/types\";\nimport * as allure from \"allure-js-commons\";\nimport { Stage, Status, type StatusDetails, type TestResult } from \"allure-js-commons\";\nimport { type RuntimeMessage, type TestPlanV1, serialize } from \"allure-js-commons/sdk\";\nimport {\n extractMetadataFromString,\n getMessageAndTraceFromError,\n getStatusFromError,\n isPromise,\n toGlobalErrorMessage,\n} from \"allure-js-commons/sdk\";\nimport {\n ReporterRuntime,\n createDefaultWriter,\n getEnvironmentLabels,\n getFallbackTestCaseIdLabel,\n getFrameworkLabel,\n getHostLabel,\n getLanguageLabel,\n getPackageLabel,\n getPosixPath,\n getProjectName,\n getSuiteLabels,\n getThreadLabel,\n includedInTestPlan,\n md5,\n parseTestPlan,\n} from \"allure-js-commons/sdk/reporter\";\nimport { setGlobalTestRuntime } from \"allure-js-commons/sdk/runtime\";\n\nimport { AllureJestTestRuntime } from \"./AllureJestTestRuntime.js\";\nimport type { AllureJestConfig, AllureJestEnvironment, AllureJestProjectConfig, RunContext } from \"./model.js\";\nimport { getTestId, getTestPath, last, shouldHookBeSkipped } from \"./utils.js\";\n\ntype JestEnvironmentConstructor = new (...args: any[]) => any;\ntype JestEventHandler = NonNullable<JestEnvironment[\"handleTestEvent\"]>;\ntype CallableJestEventHandler = (event: any, state: Circus.State) => void | PromiseLike<void> | undefined;\n\nconst createJestEnvironment = <T extends JestEnvironmentConstructor>(Base: T): T => {\n // @ts-expect-error (ts(2545)) Incorrect assumption about a mixin class: https://github.com/microsoft/TypeScript/issues/37142\n return class extends Base {\n testPath: string;\n testPlan?: TestPlanV1;\n runtime: ReporterRuntime;\n runContext: RunContext = {\n executables: [],\n steps: [],\n scopes: [],\n skippedTestsFullNamesByTestPlan: [],\n };\n\n // config is AllureJestConfig in Jest v28 or greater. In older versions\n // it's AllureJestProjectConfig. See https://github.com/jestjs/jest/pull/12461\n constructor(config: AllureJestConfig | AllureJestProjectConfig, context: EnvironmentContext) {\n super(config as JestEnvironmentConfig, context);\n\n const handleTestEvent = this.handleTestEvent?.bind(this) as CallableJestEventHandler | undefined;\n\n // Preserve any event handler defined by the base or custom environment.\n this.handleTestEvent = ((event: any, state: Circus.State) => {\n const handleAllureEvent = () => this.#handleTestEvent(event as Circus.Event, state as Circus.State);\n\n // Keep Allure's lifecycle in sync even if the custom environment fails,\n // then rethrow the original error so Jest keeps its native behavior.\n try {\n const result = handleTestEvent?.(event, state);\n\n if (isPromise(result)) {\n return Promise.resolve(result).finally(handleAllureEvent);\n }\n } catch (error) {\n handleAllureEvent();\n throw error;\n }\n\n handleAllureEvent();\n }) as JestEventHandler;\n\n const projectConfig = \"projectConfig\" in config ? config.projectConfig : config;\n const { resultsDir, ...restConfig } = projectConfig?.testEnvironmentOptions || {};\n\n this.runtime = new ReporterRuntime({\n ...restConfig,\n writer: createDefaultWriter({ resultsDir }),\n });\n this.testPath = relative(projectConfig.rootDir, context.testPath);\n this.testPlan = parseTestPlan();\n\n // @ts-ignore\n const testRuntime = new AllureJestTestRuntime(this as AllureJestEnvironment, this.global);\n\n // @ts-ignore\n this.global.allure = allure;\n\n setGlobalTestRuntime(testRuntime);\n }\n\n setup() {\n return super.setup();\n }\n\n teardown() {\n return super.teardown();\n }\n\n handleAllureRuntimeMessage(message: RuntimeMessage) {\n const executableUuid = last(this.runContext.executables);\n if (executableUuid) {\n this.runtime.applyRuntimeMessages(executableUuid, [message]);\n } else {\n this.runtime.applyGlobalRuntimeMessages([message]);\n }\n }\n\n #handleTestEvent(event: Circus.Event, _state: Circus.State) {\n switch (event.name) {\n case \"hook_start\":\n this.#handleHookStart(event.hook);\n break;\n case \"hook_success\":\n this.#handleHookPass(event.hook);\n break;\n case \"hook_failure\":\n this.#handleHookFail(event.hook, event.error);\n break;\n case \"run_describe_start\":\n this.#handleSuiteStart();\n break;\n case \"run_describe_finish\":\n this.#handleSuiteEnd();\n break;\n case \"test_start\":\n this.#handleTestScopeStart();\n break;\n case \"test_fn_start\":\n this.#handleTestStart(event.test);\n break;\n case \"test_fn_success\":\n this.#handleTestPass(event.test);\n break;\n case \"test_fn_failure\":\n this.#handleTestFail(event.test);\n break;\n case \"test_done\":\n this.#handleTestScopeStop(event.test);\n break;\n case \"test_skip\":\n this.#handleTestSkip(event.test);\n break;\n case \"test_todo\":\n this.#handleTestTodo(event.test);\n break;\n case \"run_finish\":\n this.#handleRunFinish();\n break;\n default:\n break;\n }\n }\n\n #getTestFullName(test: Circus.TestEntry, testTitle: string = test.name) {\n const newTestSuitePath = getTestPath(test.parent);\n const newTestPath = newTestSuitePath.concat(testTitle);\n const newTestId = getTestId(newTestPath);\n\n const projectName = getProjectName();\n const fullNamePath = getPosixPath(this.testPath);\n const fullNameBase = projectName ? `${projectName}:${fullNamePath}` : fullNamePath;\n return `${fullNameBase}#${newTestId}`;\n }\n\n #handleSuiteStart() {\n this.#startScope();\n }\n\n #handleSuiteEnd() {\n this.#stopScope();\n }\n\n #handleHookStart(hook: Circus.Hook) {\n if (shouldHookBeSkipped(hook)) {\n return;\n }\n\n const scopeUuid = last(this.runContext.scopes);\n const fixtureUuid = this.runtime.startFixture(scopeUuid, /after/i.test(hook.type) ? \"after\" : \"before\", {\n name: hook.type,\n })!;\n\n this.runContext.executables.push(fixtureUuid);\n }\n\n #handleHookPass(hook: Circus.Hook) {\n if (shouldHookBeSkipped(hook)) {\n return;\n }\n\n const fixtureUuid = this.runContext.executables.pop()!;\n\n this.runtime.updateFixture(fixtureUuid, (r) => {\n r.status = Status.PASSED;\n r.stage = Stage.FINISHED;\n });\n this.runtime.stopFixture(fixtureUuid);\n }\n\n #handleHookFail(hook: Circus.Hook, error: string | Circus.Exception) {\n if (shouldHookBeSkipped(hook)) {\n return;\n }\n\n const fixtureUuid = this.runContext.executables.pop()!;\n const status = typeof error === \"string\" ? Status.BROKEN : getStatusFromError(error as Error);\n const statusDetails = typeof error === \"string\" ? { message: error } : getMessageAndTraceFromError(error);\n\n this.runtime.updateFixture(fixtureUuid, (r) => {\n r.status = status;\n r.statusDetails = statusDetails;\n r.stage = Stage.FINISHED;\n });\n this.runtime.applyGlobalRuntimeMessages([\n toGlobalErrorMessage({ name: hook.type, details: statusDetails, status }),\n ]);\n this.runtime.stopFixture(fixtureUuid);\n }\n\n #handleTestStart(test: Circus.TestEntry) {\n const fsPath = this.testPath.split(sep);\n const newTestSuitePath = getTestPath(test.parent);\n const projectName = getProjectName();\n const baseTitlePath = fsPath.concat(newTestSuitePath);\n const titlePath = projectName ? [projectName, ...baseTitlePath] : baseTitlePath;\n const { cleanTitle, labels, links } = extractMetadataFromString(test.name);\n const legacyTestId = getTestId(newTestSuitePath.concat(cleanTitle));\n const legacyFullName = `${getPosixPath(this.testPath)}#${legacyTestId}`;\n const newTestFullName = this.#getTestFullName(test, cleanTitle);\n\n if (this.testPlan && !includedInTestPlan(this.testPlan, { fullName: newTestFullName, tags: [test.name] })) {\n test.mode = \"skip\";\n this.runContext.skippedTestsFullNamesByTestPlan.push(newTestFullName);\n return;\n }\n\n const testUuid = this.runtime.startTest(\n {\n name: cleanTitle,\n fullName: newTestFullName,\n start: test.startedAt ?? undefined,\n stage: Stage.RUNNING,\n labels: [\n getLanguageLabel(),\n getFrameworkLabel(\"jest\"),\n getPackageLabel(this.testPath),\n getFallbackTestCaseIdLabel(md5(legacyFullName)),\n getHostLabel(),\n getThreadLabel(env.JEST_WORKER_ID),\n ...getEnvironmentLabels(),\n ...getSuiteLabels(newTestSuitePath),\n ...labels,\n ],\n titlePath,\n links,\n },\n this.runContext.scopes,\n );\n\n this.runContext.executables.push(testUuid);\n\n return testUuid;\n }\n\n #handleTestScopeStart() {\n this.#startScope();\n }\n\n #handleTestScopeStop(test: Circus.TestEntry) {\n const testUuid = this.runContext.executables.pop();\n\n if (testUuid) {\n const { status, details } = this.#statusAndDetails(test.errors);\n let tr: TestResult | undefined;\n this.runtime.updateTest(testUuid, (result) => {\n tr = result;\n });\n // hook failure, finish with the status reported by Jest\n if (tr?.status === undefined && tr?.stage === Stage.RUNNING) {\n this.runtime.updateTest(testUuid, (result) => {\n result.stage = Stage.FINISHED;\n result.status = status;\n result.statusDetails = {\n ...result.statusDetails,\n ...details,\n };\n });\n }\n\n this.runtime.writeTest(testUuid);\n }\n\n this.#stopScope();\n }\n\n #startScope() {\n const scopeUuid = this.runtime.startScope();\n\n this.runContext.scopes.push(scopeUuid);\n }\n\n #stopScope() {\n const scopeUuid = this.runContext.scopes.pop();\n if (!scopeUuid) {\n return;\n }\n\n this.runtime.writeScope(scopeUuid);\n }\n\n #handleTestPass(test: Circus.TestEntry) {\n const testUuid = this.#currentExecutable();\n\n if (!testUuid) {\n return;\n }\n // @ts-ignore\n const { suppressedErrors = [] } = this.global.expect.getState();\n const statusAndDetails = this.#statusAndDetails(suppressedErrors as Circus.TestError[]);\n\n this.runtime.updateTest(testUuid, (result) => {\n result.stage = Stage.FINISHED;\n result.status = statusAndDetails.status;\n result.statusDetails = {\n ...result.statusDetails,\n ...statusAndDetails.details,\n };\n });\n\n this.runtime.stopTest(testUuid, { duration: test.duration ?? 0 });\n }\n\n #handleTestFail(test: Circus.TestEntry) {\n const testUuid = this.#currentExecutable();\n\n if (!testUuid) {\n return;\n }\n\n const statusAndDetails = this.#statusAndDetails(test.errors);\n const status =\n test.failing && statusAndDetails.status === Status.BROKEN ? Status.FAILED : statusAndDetails.status;\n\n this.runtime.updateTest(testUuid, (result) => {\n result.stage = Stage.FINISHED;\n result.status = status;\n result.statusDetails = {\n ...result.statusDetails,\n ...statusAndDetails.details,\n };\n });\n this.runtime.stopTest(testUuid, { duration: test.duration ?? 0 });\n }\n\n #handleTestSkip(test: Circus.TestEntry) {\n const newTestFullName = this.#getTestFullName(test);\n\n if (this.runContext.skippedTestsFullNamesByTestPlan.includes(newTestFullName)) {\n return;\n }\n\n // noinspection JSPotentiallyInvalidUsageOfThis\n const testUuid = this.#handleTestStart(test);\n\n if (!testUuid) {\n return;\n }\n\n this.runtime.updateTest(testUuid, (result) => {\n result.stage = Stage.FINISHED;\n result.status = Status.SKIPPED;\n });\n // noinspection JSPotentiallyInvalidUsageOfThis\n this.#handleTestScopeStop(test);\n }\n\n #handleTestTodo(test: Circus.TestEntry) {\n // noinspection JSPotentiallyInvalidUsageOfThis\n const testUuid = this.#handleTestStart(test);\n if (!testUuid) {\n return;\n }\n\n this.runtime.updateTest(testUuid, (result) => {\n result.stage = Stage.FINISHED;\n result.status = Status.SKIPPED;\n result.statusDetails = {\n message: \"TODO\",\n };\n });\n // noinspection JSPotentiallyInvalidUsageOfThis\n this.#handleTestScopeStop(test);\n }\n\n #handleRunFinish() {\n this.runtime.writeEnvironmentInfo();\n this.runtime.writeCategoriesDefinitions();\n }\n\n #currentExecutable() {\n if (this.runContext.executables.length === 0) {\n return undefined;\n }\n return this.runContext.executables[this.runContext.executables.length - 1];\n }\n\n #statusAndDetails(errors: Circus.TestError[]): { status: Status; details: Partial<StatusDetails> } {\n if (errors.length === 0) {\n return {\n status: Status.PASSED,\n details: {},\n };\n }\n\n // jest collects all errors, but we need to report the first one because it's a reason why the test has been failed\n const [error] = errors;\n const hasMultipleErrors = Array.isArray(error);\n const exception: Circus.Exception = hasMultipleErrors ? error[0] : error;\n const firstError = this.#convertToError(exception);\n\n // in case user throws non-Error type, the first exception is the user-thrown object,\n // while the second one is provided by jest and has correct stack trace\n if (hasMultipleErrors && error.length > 1) {\n const secondError = this.#convertToError(error[1]);\n\n if (!firstError.message) {\n firstError.message = secondError.message;\n }\n\n if (!firstError.stack) {\n firstError.stack = secondError.stack;\n }\n }\n\n const details = getMessageAndTraceFromError(firstError);\n const status = getStatusFromError(firstError);\n\n return { status, details };\n }\n\n #convertToError(exception: Circus.Exception):\n | Error\n | {\n message?: string;\n stack?: string;\n } {\n if (!exception) {\n return {};\n }\n\n // user may throw an object as well\n if (typeof exception !== \"object\" || !(\"stack\" in exception)) {\n return {\n message: serialize(exception),\n };\n }\n\n return exception;\n }\n };\n};\n\nexport { createJestEnvironment };\n"],"mappings":";;;;;;;;;;;AAAA,SAASA,QAAQ,EAAEC,GAAG,QAAQ,WAAW;AACzC,SAASC,GAAG,QAAQ,cAAc;AAIlC,OAAO,KAAKC,MAAM,MAAM,mBAAmB;AAC3C,SAASC,KAAK,EAAEC,MAAM,QAA6C,mBAAmB;AACtF,SAA+CC,SAAS,QAAQ,uBAAuB;AACvF,SACEC,yBAAyB,EACzBC,2BAA2B,EAC3BC,kBAAkB,EAClBC,SAAS,EACTC,oBAAoB,QACf,uBAAuB;AAC9B,SACEC,eAAe,EACfC,mBAAmB,EACnBC,oBAAoB,EACpBC,0BAA0B,EAC1BC,iBAAiB,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"file":"environmentFactory.js","names":["relative","sep","env","allure","Stage","Status","serialize","extractMetadataFromString","getMessageAndTraceFromError","getStatusFromError","isPromise","toGlobalErrorMessage","ReporterRuntime","createDefaultWriter","getEnvironmentLabels","getFallbackTestCaseIdLabel","getFrameworkLabel","getHostLabel","getLanguageLabel","getPackageLabel","getPosixPath","getProjectName","getSuiteLabels","getThreadLabel","includedInTestPlan","md5","parseTestPlan","setGlobalTestRuntime","AllureJestTestRuntime","getTestId","getTestPath","last","shouldHookBeSkipped","createJestEnvironment","Base","_testContexts","_Class_brand","WeakMap","WeakSet","constructor","config","context","_this$handleTestEvent","_classPrivateMethodInitSpec","_defineProperty","executables","steps","scopes","skippedTestsFullNamesByTestPlan","_classPrivateFieldInitSpec","Map","handleTestEvent","bind","event","state","_this$global$expect$g","_this$global$expect","_this$global$expect$g2","_this$global$expect$g3","hookTest","name","global","expect","getState","currentTestIdentity","call","currentlyRunningTest","undefined","handleAllureEvent","_assertClassBrand","_handleTestEvent","result","Promise","resolve","finally","error","projectConfig","_ref","testEnvironmentOptions","resultsDir","restConfig","_objectWithoutProperties","_excluded","runtime","_objectSpread","writer","testPath","rootDir","testPlan","testRuntime","setup","teardown","handleAllureRuntimeMessage","message","_this$global$expect2","_context$fixtureUuid","_ref2","_last","getIdentity","identity","_classPrivateFieldGet","get","values","executableUuid","fixtureUuid","uuid","runContext","applyRuntimeMessages","applyGlobalRuntimeMessages","_handleHookStart","hook","_handleHookPass","test","_handleHookFail","_handleSuiteStart","_handleSuiteEnd","_handleTestScopeStart","_handleTestStart","_handleTestPass","_handleTestFail","_handleTestScopeStop","_handleTestSkip","_handleTestTodo","_handleRunFinish","_getTestFullName","testTitle","arguments","length","newTestSuitePath","parent","newTestPath","concat","newTestId","projectName","fullNamePath","fullNameBase","_startScope","_stopScope","_context$scopeUuid","type","endsWith","scopeUuid","startFixture","push","_context$fixtureUuid2","pop","updateFixture","r","status","PASSED","stage","FINISHED","stopFixture","_context$fixtureUuid3","BROKEN","statusDetails","details","_test$startedAt","fsPath","split","baseTitlePath","titlePath","cleanTitle","labels","links","legacyTestId","legacyFullName","newTestFullName","fullName","tags","mode","testUuid","startTest","start","startedAt","RUNNING","JEST_WORKER_ID","startScope","set","_tr","_tr2","_statusAndDetails","errors","tr","updateTest","writeTest","writeScope","delete","_classPrivateFieldGet2","_test$duration","suppressedErrors","statusAndDetails","stopTest","duration","_classPrivateFieldGet3","_test$duration2","failing","FAILED","includes","SKIPPED","writeEnvironmentInfo","writeCategoriesDefinitions","hasMultipleErrors","Array","isArray","exception","firstError","_convertToError","secondError","stack"],"sources":["../../src/environmentFactory.ts"],"sourcesContent":["import { relative, sep } from \"node:path\";\nimport { env } from \"node:process\";\n\nimport type { EnvironmentContext, JestEnvironment, JestEnvironmentConfig } from \"@jest/environment\";\nimport type { Circus } from \"@jest/types\";\nimport * as allure from \"allure-js-commons\";\nimport { Stage, Status, type StatusDetails, type TestResult } from \"allure-js-commons\";\nimport { type RuntimeMessage, type TestPlanV1, serialize } from \"allure-js-commons/sdk\";\nimport {\n extractMetadataFromString,\n getMessageAndTraceFromError,\n getStatusFromError,\n isPromise,\n toGlobalErrorMessage,\n} from \"allure-js-commons/sdk\";\nimport {\n ReporterRuntime,\n createDefaultWriter,\n getEnvironmentLabels,\n getFallbackTestCaseIdLabel,\n getFrameworkLabel,\n getHostLabel,\n getLanguageLabel,\n getPackageLabel,\n getPosixPath,\n getProjectName,\n getSuiteLabels,\n getThreadLabel,\n includedInTestPlan,\n md5,\n parseTestPlan,\n} from \"allure-js-commons/sdk/reporter\";\nimport { setGlobalTestRuntime } from \"allure-js-commons/sdk/runtime\";\n\nimport { AllureJestTestRuntime } from \"./AllureJestTestRuntime.js\";\nimport type { AllureJestConfig, AllureJestEnvironment, AllureJestProjectConfig, RunContext } from \"./model.js\";\nimport { getTestId, getTestPath, last, shouldHookBeSkipped } from \"./utils.js\";\n\ntype JestEnvironmentConstructor = new (...args: any[]) => any;\ntype JestEventHandler = NonNullable<JestEnvironment[\"handleTestEvent\"]>;\ntype CallableJestEventHandler = (event: any, state: Circus.State) => void | PromiseLike<void> | undefined;\n\ntype TestContext = {\n scopeUuid: string;\n uuid?: string;\n fixtureUuid?: string;\n};\n\nconst createJestEnvironment = <T extends JestEnvironmentConstructor>(Base: T): T => {\n // @ts-expect-error (ts(2545)) Incorrect assumption about a mixin class: https://github.com/microsoft/TypeScript/issues/37142\n return class extends Base {\n testPath: string;\n testPlan?: TestPlanV1;\n runtime: ReporterRuntime;\n runContext: RunContext = {\n executables: [],\n steps: [],\n scopes: [],\n skippedTestsFullNamesByTestPlan: [],\n };\n\n #testContexts = new Map<object, TestContext>();\n\n // config is AllureJestConfig in Jest v28 or greater. In older versions\n // it's AllureJestProjectConfig. See https://github.com/jestjs/jest/pull/12461\n constructor(config: AllureJestConfig | AllureJestProjectConfig, context: EnvironmentContext) {\n super(config as JestEnvironmentConfig, context);\n\n const handleTestEvent = this.handleTestEvent?.bind(this) as CallableJestEventHandler | undefined;\n\n // Preserve any event handler defined by the base or custom environment.\n this.handleTestEvent = ((event: any, state: Circus.State) => {\n // Capture the hook owner before a custom handler can yield or change\n // Circus's shared cursor. Runtime messages use the same native identity.\n const hookTest =\n event.name === \"hook_start\"\n ? (this.global.expect?.getState().currentTestIdentity?.() ?? state.currentlyRunningTest)\n : undefined;\n const handleAllureEvent = () => this.#handleTestEvent(event as Circus.Event, hookTest);\n\n // Keep Allure's lifecycle in sync even if the custom environment fails,\n // then rethrow the original error so Jest keeps its native behavior.\n try {\n const result = handleTestEvent?.(event, state);\n\n if (isPromise(result)) {\n return Promise.resolve(result).finally(handleAllureEvent);\n }\n } catch (error) {\n handleAllureEvent();\n throw error;\n }\n\n handleAllureEvent();\n }) as JestEventHandler;\n\n const projectConfig = \"projectConfig\" in config ? config.projectConfig : config;\n const { resultsDir, ...restConfig } = projectConfig?.testEnvironmentOptions || {};\n\n this.runtime = new ReporterRuntime({\n ...restConfig,\n writer: createDefaultWriter({ resultsDir }),\n });\n this.testPath = relative(projectConfig.rootDir, context.testPath);\n this.testPlan = parseTestPlan();\n\n // @ts-ignore\n const testRuntime = new AllureJestTestRuntime(this as AllureJestEnvironment, this.global);\n\n // @ts-ignore\n this.global.allure = allure;\n\n setGlobalTestRuntime(testRuntime);\n }\n\n setup() {\n return super.setup();\n }\n\n teardown() {\n return super.teardown();\n }\n\n handleAllureRuntimeMessage(message: RuntimeMessage) {\n const getIdentity: (() => object | undefined) | undefined = this.global.expect?.getState().currentTestIdentity;\n const identity = getIdentity?.();\n const context = getIdentity\n ? identity && this.#testContexts.get(identity)\n : last([...this.#testContexts.values()]);\n const executableUuid =\n getIdentity && identity\n ? (context?.fixtureUuid ?? context?.uuid)\n : (last(this.runContext.executables) ?? context?.fixtureUuid ?? context?.uuid);\n if (executableUuid) {\n this.runtime.applyRuntimeMessages(executableUuid, [message]);\n } else {\n this.runtime.applyGlobalRuntimeMessages([message]);\n }\n }\n\n #handleTestEvent(event: Circus.Event, hookTest?: Circus.TestEntry | null) {\n switch (event.name) {\n case \"hook_start\":\n this.#handleHookStart(event.hook, hookTest);\n break;\n case \"hook_success\":\n this.#handleHookPass(event.hook, event.test);\n break;\n case \"hook_failure\":\n this.#handleHookFail(event.hook, event.error, event.test);\n break;\n case \"run_describe_start\":\n this.#handleSuiteStart();\n break;\n case \"run_describe_finish\":\n this.#handleSuiteEnd();\n break;\n case \"test_start\":\n this.#handleTestScopeStart(event.test);\n break;\n case \"test_fn_start\":\n this.#handleTestStart(event.test);\n break;\n case \"test_fn_success\":\n this.#handleTestPass(event.test);\n break;\n case \"test_fn_failure\":\n this.#handleTestFail(event.test);\n break;\n case \"test_done\":\n this.#handleTestScopeStop(event.test);\n break;\n case \"test_skip\":\n this.#handleTestSkip(event.test);\n break;\n case \"test_todo\":\n this.#handleTestTodo(event.test);\n break;\n case \"run_finish\":\n this.#handleRunFinish();\n break;\n default:\n break;\n }\n }\n\n #getTestFullName(test: Circus.TestEntry, testTitle: string = test.name) {\n const newTestSuitePath = getTestPath(test.parent);\n const newTestPath = newTestSuitePath.concat(testTitle);\n const newTestId = getTestId(newTestPath);\n\n const projectName = getProjectName();\n const fullNamePath = getPosixPath(this.testPath);\n const fullNameBase = projectName ? `${projectName}:${fullNamePath}` : fullNamePath;\n return `${fullNameBase}#${newTestId}`;\n }\n\n #handleSuiteStart() {\n this.#startScope();\n }\n\n #handleSuiteEnd() {\n this.#stopScope();\n }\n\n #handleHookStart(hook: Circus.Hook, test?: Circus.TestEntry | null) {\n if (shouldHookBeSkipped(hook)) {\n return;\n }\n\n const context = test && hook.type.endsWith(\"Each\") ? this.#testContexts.get(test) : undefined;\n const scopeUuid = context?.scopeUuid ?? last(this.runContext.scopes);\n const fixtureUuid = this.runtime.startFixture(scopeUuid, /after/i.test(hook.type) ? \"after\" : \"before\", {\n name: hook.type,\n })!;\n\n if (context) {\n context.fixtureUuid = fixtureUuid;\n } else {\n this.runContext.executables.push(fixtureUuid);\n }\n }\n\n #handleHookPass(hook: Circus.Hook, test?: Circus.TestEntry) {\n if (shouldHookBeSkipped(hook)) {\n return;\n }\n\n const context = test ? this.#testContexts.get(test) : undefined;\n const fixtureUuid = context?.fixtureUuid ?? this.runContext.executables.pop()!;\n if (context) {\n delete context.fixtureUuid;\n }\n\n this.runtime.updateFixture(fixtureUuid, (r) => {\n r.status = Status.PASSED;\n r.stage = Stage.FINISHED;\n });\n this.runtime.stopFixture(fixtureUuid);\n }\n\n #handleHookFail(hook: Circus.Hook, error: Circus.Exception, test?: Circus.TestEntry) {\n if (shouldHookBeSkipped(hook)) {\n return;\n }\n\n const context = test ? this.#testContexts.get(test) : undefined;\n const fixtureUuid = context?.fixtureUuid ?? this.runContext.executables.pop()!;\n if (context) {\n delete context.fixtureUuid;\n }\n const status = typeof error === \"string\" ? Status.BROKEN : getStatusFromError(error as Error);\n const statusDetails = typeof error === \"string\" ? { message: error } : getMessageAndTraceFromError(error);\n\n this.runtime.updateFixture(fixtureUuid, (r) => {\n r.status = status;\n r.statusDetails = statusDetails;\n r.stage = Stage.FINISHED;\n });\n this.runtime.applyGlobalRuntimeMessages([\n toGlobalErrorMessage({ name: hook.type, details: statusDetails, status }),\n ]);\n this.runtime.stopFixture(fixtureUuid);\n }\n\n #handleTestStart(test: Circus.TestEntry) {\n const fsPath = this.testPath.split(sep);\n const newTestSuitePath = getTestPath(test.parent);\n const projectName = getProjectName();\n const baseTitlePath = fsPath.concat(newTestSuitePath);\n const titlePath = projectName ? [projectName, ...baseTitlePath] : baseTitlePath;\n const { cleanTitle, labels, links } = extractMetadataFromString(test.name);\n const legacyTestId = getTestId(newTestSuitePath.concat(cleanTitle));\n const legacyFullName = `${getPosixPath(this.testPath)}#${legacyTestId}`;\n const newTestFullName = this.#getTestFullName(test, cleanTitle);\n\n if (this.testPlan && !includedInTestPlan(this.testPlan, { fullName: newTestFullName, tags: [test.name] })) {\n test.mode = \"skip\";\n this.runContext.skippedTestsFullNamesByTestPlan.push(newTestFullName);\n return;\n }\n\n const context = this.#handleTestScopeStart(test);\n const testUuid = this.runtime.startTest(\n {\n name: cleanTitle,\n fullName: newTestFullName,\n start: test.startedAt ?? undefined,\n stage: Stage.RUNNING,\n labels: [\n getLanguageLabel(),\n getFrameworkLabel(\"jest\"),\n getPackageLabel(this.testPath),\n getFallbackTestCaseIdLabel(md5(legacyFullName)),\n getHostLabel(),\n getThreadLabel(env.JEST_WORKER_ID),\n ...getEnvironmentLabels(),\n ...getSuiteLabels(newTestSuitePath),\n ...labels,\n ],\n titlePath,\n links,\n },\n [...this.runContext.scopes, context.scopeUuid],\n );\n\n context.uuid = testUuid;\n\n return testUuid;\n }\n\n #handleTestScopeStart(test: Circus.TestEntry) {\n let context = this.#testContexts.get(test);\n if (!context) {\n context = { scopeUuid: this.runtime.startScope() };\n this.#testContexts.set(test, context);\n }\n return context;\n }\n\n #handleTestScopeStop(test: Circus.TestEntry) {\n const context = this.#testContexts.get(test);\n const testUuid = context?.uuid;\n\n if (testUuid) {\n const { status, details } = this.#statusAndDetails(test.errors);\n let tr: TestResult | undefined;\n this.runtime.updateTest(testUuid, (result) => {\n tr = result;\n });\n // hook failure, finish with the status reported by Jest\n if (tr?.status === undefined && tr?.stage === Stage.RUNNING) {\n this.runtime.updateTest(testUuid, (result) => {\n result.stage = Stage.FINISHED;\n result.status = status;\n result.statusDetails = {\n ...result.statusDetails,\n ...details,\n };\n });\n }\n\n this.runtime.writeTest(testUuid);\n }\n\n if (context) {\n this.runtime.writeScope(context.scopeUuid);\n this.#testContexts.delete(test);\n }\n }\n\n #startScope() {\n const scopeUuid = this.runtime.startScope();\n\n this.runContext.scopes.push(scopeUuid);\n }\n\n #stopScope() {\n const scopeUuid = this.runContext.scopes.pop();\n if (!scopeUuid) {\n return;\n }\n\n this.runtime.writeScope(scopeUuid);\n }\n\n #handleTestPass(test: Circus.TestEntry) {\n const testUuid = this.#testContexts.get(test)?.uuid;\n\n if (!testUuid) {\n return;\n }\n // @ts-ignore\n const { suppressedErrors = [] } = this.global.expect.getState();\n const statusAndDetails = this.#statusAndDetails(suppressedErrors as Circus.TestError[]);\n\n this.runtime.updateTest(testUuid, (result) => {\n result.stage = Stage.FINISHED;\n result.status = statusAndDetails.status;\n result.statusDetails = {\n ...result.statusDetails,\n ...statusAndDetails.details,\n };\n });\n\n this.runtime.stopTest(testUuid, { duration: test.duration ?? 0 });\n }\n\n #handleTestFail(test: Circus.TestEntry) {\n const testUuid = this.#testContexts.get(test)?.uuid;\n\n if (!testUuid) {\n return;\n }\n\n const statusAndDetails = this.#statusAndDetails(test.errors);\n const status =\n test.failing && statusAndDetails.status === Status.BROKEN ? Status.FAILED : statusAndDetails.status;\n\n this.runtime.updateTest(testUuid, (result) => {\n result.stage = Stage.FINISHED;\n result.status = status;\n result.statusDetails = {\n ...result.statusDetails,\n ...statusAndDetails.details,\n };\n });\n this.runtime.stopTest(testUuid, { duration: test.duration ?? 0 });\n }\n\n #handleTestSkip(test: Circus.TestEntry) {\n const newTestFullName = this.#getTestFullName(test);\n\n if (this.runContext.skippedTestsFullNamesByTestPlan.includes(newTestFullName)) {\n this.#handleTestScopeStop(test);\n return;\n }\n\n // noinspection JSPotentiallyInvalidUsageOfThis\n const testUuid = this.#handleTestStart(test);\n\n if (!testUuid) {\n return;\n }\n\n this.runtime.updateTest(testUuid, (result) => {\n result.stage = Stage.FINISHED;\n result.status = Status.SKIPPED;\n });\n // noinspection JSPotentiallyInvalidUsageOfThis\n this.#handleTestScopeStop(test);\n }\n\n #handleTestTodo(test: Circus.TestEntry) {\n // noinspection JSPotentiallyInvalidUsageOfThis\n const testUuid = this.#handleTestStart(test);\n if (!testUuid) {\n return;\n }\n\n this.runtime.updateTest(testUuid, (result) => {\n result.stage = Stage.FINISHED;\n result.status = Status.SKIPPED;\n result.statusDetails = {\n message: \"TODO\",\n };\n });\n // noinspection JSPotentiallyInvalidUsageOfThis\n this.#handleTestScopeStop(test);\n }\n\n #handleRunFinish() {\n this.runtime.writeEnvironmentInfo();\n this.runtime.writeCategoriesDefinitions();\n }\n\n #statusAndDetails(errors: Circus.TestError[]): { status: Status; details: Partial<StatusDetails> } {\n if (errors.length === 0) {\n return {\n status: Status.PASSED,\n details: {},\n };\n }\n\n // jest collects all errors, but we need to report the first one because it's a reason why the test has been failed\n const [error] = errors;\n const hasMultipleErrors = Array.isArray(error);\n const exception: Circus.Exception = hasMultipleErrors ? error[0] : error;\n const firstError = this.#convertToError(exception);\n\n // in case user throws non-Error type, the first exception is the user-thrown object,\n // while the second one is provided by jest and has correct stack trace\n if (hasMultipleErrors && error.length > 1) {\n const secondError = this.#convertToError(error[1]);\n\n if (!firstError.message) {\n firstError.message = secondError.message;\n }\n\n if (!firstError.stack) {\n firstError.stack = secondError.stack;\n }\n }\n\n const details = getMessageAndTraceFromError(firstError);\n const status = getStatusFromError(firstError);\n\n return { status, details };\n }\n\n #convertToError(exception: Circus.Exception):\n | Error\n | {\n message?: string;\n stack?: string;\n } {\n if (!exception) {\n return {};\n }\n\n // user may throw an object as well\n if (typeof exception !== \"object\" || !(\"stack\" in exception)) {\n return {\n message: serialize(exception),\n };\n }\n\n return exception;\n }\n };\n};\n\nexport { createJestEnvironment };\n"],"mappings":";;;;;;;;;;;;;AAAA,SAASA,QAAQ,EAAEC,GAAG,QAAQ,WAAW;AACzC,SAASC,GAAG,QAAQ,cAAc;AAIlC,OAAO,KAAKC,MAAM,MAAM,mBAAmB;AAC3C,SAASC,KAAK,EAAEC,MAAM,QAA6C,mBAAmB;AACtF,SAA+CC,SAAS,QAAQ,uBAAuB;AACvF,SACEC,yBAAyB,EACzBC,2BAA2B,EAC3BC,kBAAkB,EAClBC,SAAS,EACTC,oBAAoB,QACf,uBAAuB;AAC9B,SACEC,eAAe,EACfC,mBAAmB,EACnBC,oBAAoB,EACpBC,0BAA0B,EAC1BC,iBAAiB,EACjBC,YAAY,EACZC,gBAAgB,EAChBC,eAAe,EACfC,YAAY,EACZC,cAAc,EACdC,cAAc,EACdC,cAAc,EACdC,kBAAkB,EAClBC,GAAG,EACHC,aAAa,QACR,gCAAgC;AACvC,SAASC,oBAAoB,QAAQ,+BAA+B;AAEpE,SAASC,qBAAqB,QAAQ,4BAA4B;AAElE,SAASC,SAAS,EAAEC,WAAW,EAAEC,IAAI,EAAEC,mBAAmB,QAAQ,YAAY;AAY9E,IAAMC,qBAAqB,GAA0CC,IAAO,IAAQ;EAAA,IAAAC,aAAA,EAAAC,YAAA;EAClF;EACA,OAAAD,aAAA,oBAAAE,OAAA,IAAAD,YAAA,oBAAAE,OAAA,IAAO,cAAcJ,IAAI,CAAC;IAaxB;IACA;IACAK,WAAWA,CAACC,MAAkD,EAAEC,QAA2B,EAAE;MAAA,IAAAC,qBAAA;MAC3F,KAAK,CAACF,MAAM,EAA2BC,QAAO,CAAC;MAACE,2BAAA,OAAAP,YAAA;MAAAQ,eAAA;MAAAA,eAAA;MAAAA,eAAA;MAAAA,eAAA,qBAZzB;QACvBC,WAAW,EAAE,EAAE;QACfC,KAAK,EAAE,EAAE;QACTC,MAAM,EAAE,EAAE;QACVC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B,CAAC;IACH;IAEA,OAAOA,SAAS;EAClB;AAEJ,CAAC;AAED,SAAS5K,qBAAqB","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "allure-jest",
3
- "version": "3.14.0",
3
+ "version": "3.15.0",
4
4
  "description": "Allure Jest integration",
5
5
  "keywords": [
6
6
  "allure",
@@ -60,7 +60,7 @@
60
60
  "test": "vitest run"
61
61
  },
62
62
  "dependencies": {
63
- "allure-js-commons": "3.14.0"
63
+ "allure-js-commons": "3.15.0"
64
64
  },
65
65
  "devDependencies": {
66
66
  "@babel/cli": "^8.0.1",
@@ -68,13 +68,10 @@
68
68
  "@babel/preset-env": "^7.28.0",
69
69
  "@babel/preset-typescript": "^7.27.1",
70
70
  "@jest/environment": "^30.0.0",
71
- "@jest/expect": "^30.0.0",
72
71
  "@jest/types": "^30.0.0",
73
- "@types/babel__core": "^7.20.5",
74
- "@types/babel__preset-env": "^7.10.0",
75
72
  "@types/node": "^26.0.1",
76
73
  "allure-commandline": "^2.29.0",
77
- "allure-vitest": "3.14.0",
74
+ "allure-vitest": "3.15.0",
78
75
  "babel-plugin-add-module-exports": "^1.0.4",
79
76
  "jest-cli": "^30.0.0",
80
77
  "jest-environment-jsdom": "^30.0.0",