@react-native-harness/jest 1.3.0 → 1.4.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.
Files changed (98) hide show
  1. package/dist/__tests__/bridge.test.js +29 -4
  2. package/dist/__tests__/crash-monitor.test.js +194 -176
  3. package/dist/__tests__/environment-reset.test.d.ts +2 -0
  4. package/dist/__tests__/environment-reset.test.d.ts.map +1 -0
  5. package/dist/__tests__/environment-reset.test.js +238 -0
  6. package/dist/__tests__/errors.test.js +39 -0
  7. package/dist/__tests__/execute-run.test.js +439 -29
  8. package/dist/__tests__/format-harness-error.test.d.ts +2 -0
  9. package/dist/__tests__/format-harness-error.test.d.ts.map +1 -0
  10. package/dist/__tests__/format-harness-error.test.js +27 -0
  11. package/dist/__tests__/harness-cache.test.js +62 -41
  12. package/dist/__tests__/harness-session-signal.test.d.ts +2 -0
  13. package/dist/__tests__/harness-session-signal.test.d.ts.map +1 -0
  14. package/dist/__tests__/harness-session-signal.test.js +298 -0
  15. package/dist/__tests__/harness-session.test.js +217 -234
  16. package/dist/__tests__/index.test.js +62 -11
  17. package/dist/__tests__/metro-port.test.js +2 -0
  18. package/dist/__tests__/run.test.d.ts +2 -0
  19. package/dist/__tests__/run.test.d.ts.map +1 -0
  20. package/dist/__tests__/run.test.js +48 -0
  21. package/dist/__tests__/test-file-platform-filter.test.d.ts +2 -0
  22. package/dist/__tests__/test-file-platform-filter.test.d.ts.map +1 -0
  23. package/dist/__tests__/test-file-platform-filter.test.js +47 -0
  24. package/dist/crash-monitor.d.ts +12 -4
  25. package/dist/crash-monitor.d.ts.map +1 -1
  26. package/dist/crash-monitor.js +135 -102
  27. package/dist/diagnostics/__tests__/derivers.test.d.ts +2 -0
  28. package/dist/diagnostics/__tests__/derivers.test.d.ts.map +1 -0
  29. package/dist/diagnostics/__tests__/derivers.test.js +248 -0
  30. package/dist/diagnostics/__tests__/report.test.d.ts +2 -0
  31. package/dist/diagnostics/__tests__/report.test.d.ts.map +1 -0
  32. package/dist/diagnostics/__tests__/report.test.js +97 -0
  33. package/dist/diagnostics/derivers.d.ts +24 -0
  34. package/dist/diagnostics/derivers.d.ts.map +1 -0
  35. package/dist/diagnostics/derivers.js +146 -0
  36. package/dist/diagnostics/index.d.ts +3 -0
  37. package/dist/diagnostics/index.d.ts.map +1 -0
  38. package/dist/diagnostics/index.js +2 -0
  39. package/dist/diagnostics/report.d.ts +7 -0
  40. package/dist/diagnostics/report.d.ts.map +1 -0
  41. package/dist/diagnostics/report.js +84 -0
  42. package/dist/environment-reset.d.ts +51 -0
  43. package/dist/environment-reset.d.ts.map +1 -0
  44. package/dist/environment-reset.js +83 -0
  45. package/dist/errors.d.ts +10 -0
  46. package/dist/errors.d.ts.map +1 -1
  47. package/dist/errors.js +41 -2
  48. package/dist/execute-run.d.ts +4 -2
  49. package/dist/execute-run.d.ts.map +1 -1
  50. package/dist/execute-run.js +179 -49
  51. package/dist/format-harness-error.d.ts +5 -0
  52. package/dist/format-harness-error.d.ts.map +1 -0
  53. package/dist/format-harness-error.js +43 -0
  54. package/dist/harness-session.d.ts +46 -1
  55. package/dist/harness-session.d.ts.map +1 -1
  56. package/dist/harness-session.js +386 -118
  57. package/dist/index.d.ts +7 -3
  58. package/dist/index.d.ts.map +1 -1
  59. package/dist/index.js +24 -2
  60. package/dist/run.d.ts.map +1 -1
  61. package/dist/run.js +22 -4
  62. package/dist/test-file-platform-filter.d.ts +5 -0
  63. package/dist/test-file-platform-filter.d.ts.map +1 -0
  64. package/dist/test-file-platform-filter.js +40 -0
  65. package/dist/toTestResult.d.ts +1 -0
  66. package/dist/toTestResult.d.ts.map +1 -1
  67. package/dist/toTestResult.js +2 -2
  68. package/dist/tsconfig.lib.tsbuildinfo +1 -1
  69. package/package.json +8 -7
  70. package/src/__tests__/bridge.test.ts +45 -5
  71. package/src/__tests__/crash-monitor.test.ts +234 -199
  72. package/src/__tests__/environment-reset.test.ts +308 -0
  73. package/src/__tests__/errors.test.ts +75 -0
  74. package/src/__tests__/execute-run.test.ts +561 -37
  75. package/src/__tests__/format-harness-error.test.ts +32 -0
  76. package/src/__tests__/harness-cache.test.ts +91 -0
  77. package/src/__tests__/harness-session.test.ts +303 -0
  78. package/src/__tests__/index.test.ts +92 -12
  79. package/src/__tests__/metro-port.test.ts +2 -0
  80. package/src/__tests__/run.test.ts +74 -0
  81. package/src/__tests__/test-file-platform-filter.test.ts +83 -0
  82. package/src/crash-monitor.ts +220 -131
  83. package/src/diagnostics/__tests__/derivers.test.ts +300 -0
  84. package/src/diagnostics/__tests__/report.test.ts +128 -0
  85. package/src/diagnostics/derivers.ts +170 -0
  86. package/src/diagnostics/index.ts +2 -0
  87. package/src/diagnostics/report.ts +124 -0
  88. package/src/environment-reset.ts +138 -0
  89. package/src/errors.ts +62 -1
  90. package/src/execute-run.ts +230 -57
  91. package/src/format-harness-error.ts +73 -0
  92. package/src/harness-session.ts +535 -162
  93. package/src/index.ts +40 -11
  94. package/src/run.ts +24 -4
  95. package/src/test-file-platform-filter.ts +57 -0
  96. package/src/toTestResult.ts +3 -2
  97. package/tsconfig.json +3 -0
  98. package/tsconfig.lib.json +3 -0
package/dist/index.d.ts CHANGED
@@ -1,8 +1,12 @@
1
- import type { CallbackTestRunnerInterface, Config, OnTestFailure, OnTestStart, OnTestSuccess, Test, TestRunnerOptions, TestWatcher } from 'jest-runner';
2
- export default class JestHarness implements CallbackTestRunnerInterface {
1
+ import type { Config, EmittingTestRunnerInterface, Test, TestEvents, TestRunnerOptions, TestWatcher } from 'jest-runner';
2
+ type TestEventListener<Name extends keyof TestEvents> = (eventData: TestEvents[Name]) => void | Promise<void>;
3
+ export default class JestHarness implements EmittingTestRunnerInterface {
3
4
  #private;
4
5
  readonly isSerial = true;
6
+ readonly supportsEventEmitters: true;
5
7
  constructor(globalConfig: Config.GlobalConfig);
6
- runTests(tests: Array<Test>, watcher: TestWatcher, onStart: OnTestStart, onResult: OnTestSuccess, onFailure: OnTestFailure, options: TestRunnerOptions): Promise<void>;
8
+ on<Name extends keyof TestEvents>(eventName: Name, listener: TestEventListener<Name>): () => void;
9
+ runTests(tests: Array<Test>, watcher: TestWatcher, options: TestRunnerOptions): Promise<void>;
7
10
  }
11
+ export {};
8
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,2BAA2B,EAC3B,MAAM,EACN,aAAa,EACb,WAAW,EACX,aAAa,EACb,IAAI,EACJ,iBAAiB,EACjB,WAAW,EACZ,MAAM,aAAa,CAAC;AAMrB,MAAM,CAAC,OAAO,OAAO,WAAY,YAAW,2BAA2B;;IACrE,QAAQ,CAAC,QAAQ,QAAQ;gBAKb,YAAY,EAAE,MAAM,CAAC,YAAY;IAIvC,QAAQ,CACZ,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,EAClB,OAAO,EAAE,WAAW,EACpB,OAAO,EAAE,WAAW,EACpB,QAAQ,EAAE,aAAa,EACvB,SAAS,EAAE,aAAa,EACxB,OAAO,EAAE,iBAAiB,GACzB,OAAO,CAAC,IAAI,CAAC;CAiCjB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,MAAM,EACN,2BAA2B,EAC3B,IAAI,EACJ,UAAU,EACV,iBAAiB,EACjB,WAAW,EACZ,MAAM,aAAa,CAAC;AAMrB,KAAK,iBAAiB,CAAC,IAAI,SAAS,MAAM,UAAU,IAAI,CACtD,SAAS,EAAE,UAAU,CAAC,IAAI,CAAC,KACxB,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AAE1B,MAAM,CAAC,OAAO,OAAO,WAAY,YAAW,2BAA2B;;IACrE,QAAQ,CAAC,QAAQ,QAAQ;IACzB,QAAQ,CAAC,qBAAqB,EAAG,IAAI,CAAU;gBAMnC,YAAY,EAAE,MAAM,CAAC,YAAY;IAI7C,EAAE,CAAC,IAAI,SAAS,MAAM,UAAU,EAC9B,SAAS,EAAE,IAAI,EACf,QAAQ,EAAE,iBAAiB,CAAC,IAAI,CAAC,GAChC,MAAM,IAAI;IAaP,QAAQ,CACZ,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,EAClB,OAAO,EAAE,WAAW,EACpB,OAAO,EAAE,iBAAiB,GACzB,OAAO,CAAC,IAAI,CAAC;CA6CjB"}
package/dist/index.js CHANGED
@@ -4,12 +4,25 @@ import { HarnessError } from '@react-native-harness/tools';
4
4
  import { getErrorMessage } from './logs.js';
5
5
  export default class JestHarness {
6
6
  isSerial = true;
7
+ supportsEventEmitters = true;
7
8
  #globalConfig;
8
9
  #session = null;
10
+ #listeners = new Map();
9
11
  constructor(globalConfig) {
10
12
  this.#globalConfig = globalConfig;
11
13
  }
12
- async runTests(tests, watcher, onStart, onResult, onFailure, options) {
14
+ on(eventName, listener) {
15
+ const listeners = this.#listeners.get(eventName) ?? new Set();
16
+ listeners.add(listener);
17
+ this.#listeners.set(eventName, listeners);
18
+ return () => {
19
+ listeners.delete(listener);
20
+ if (listeners.size === 0) {
21
+ this.#listeners.delete(eventName);
22
+ }
23
+ };
24
+ }
25
+ async runTests(tests, watcher, options) {
13
26
  if (!options.serial) {
14
27
  throw new Error('Parallel test running is not supported');
15
28
  }
@@ -18,7 +31,7 @@ export default class JestHarness {
18
31
  if (!this.#session) {
19
32
  this.#session = await createHarnessSession(this.#globalConfig);
20
33
  }
21
- await executeRun(this.#session, tests, watcher, onStart, onResult, onFailure, this.#globalConfig);
34
+ await executeRun(this.#session, tests, watcher, this.#emit, this.#globalConfig);
22
35
  }
23
36
  catch (error) {
24
37
  if (error instanceof HarnessError) {
@@ -33,4 +46,13 @@ export default class JestHarness {
33
46
  }
34
47
  }
35
48
  }
49
+ #emit = async (eventName, ...eventData) => {
50
+ const listeners = this.#listeners.get(eventName);
51
+ if (!listeners) {
52
+ return;
53
+ }
54
+ for (const listener of listeners) {
55
+ await listener(eventData);
56
+ }
57
+ };
36
58
  }
package/dist/run.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../src/run.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACjE,OAAO,KAAK,EACV,eAAe,IAAI,sBAAsB,EAE1C,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAuD3D,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,EAAE;IACzC,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,cAAc,CAAC;IACxB,aAAa,EAAE,UAAU,CAAC,aAAa,CAAC;IACxC,YAAY,EAAE,UAAU,CAAC,YAAY,CAAC;CACvC,KAAK,OAAO,CAAC;IACZ,UAAU,EAAE,cAAc,CAAC;IAC3B,aAAa,EAAE,sBAAsB,CAAC;IACtC,gBAAgB,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC,CAAC;AAEH,eAAO,MAAM,kBAAkB,EAAE,kBAkFhC,CAAC"}
1
+ {"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../src/run.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACjE,OAAO,KAAK,EACV,eAAe,IAAI,sBAAsB,EAE1C,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAmE3D,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,EAAE;IACzC,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,cAAc,CAAC;IACxB,aAAa,EAAE,UAAU,CAAC,aAAa,CAAC;IACxC,YAAY,EAAE,UAAU,CAAC,YAAY,CAAC;CACvC,KAAK,OAAO,CAAC;IACZ,UAAU,EAAE,cAAc,CAAC;IAC3B,aAAa,EAAE,sBAAsB,CAAC;IACtC,gBAAgB,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC,CAAC;AAEH,eAAO,MAAM,kBAAkB,EAAE,kBA0FhC,CAAC"}
package/dist/run.js CHANGED
@@ -1,9 +1,20 @@
1
1
  import path from 'node:path';
2
2
  import { formatResultsErrors } from 'jest-message-util';
3
3
  import { toTestResult } from './toTestResult.js';
4
+ import { formatHarnessErrorMessage } from './format-harness-error.js';
4
5
  // Helper function to flatten nested test suites into a flat array of tests with hierarchy
5
6
  const flattenTests = (suiteResult, ancestorTitles = []) => {
6
7
  const tests = [];
8
+ if (suiteResult.error) {
9
+ tests.push({
10
+ name: suiteResult.name,
11
+ status: 'failed',
12
+ duration: suiteResult.duration,
13
+ error: suiteResult.error,
14
+ ancestorTitles: [...ancestorTitles],
15
+ fullName: [...ancestorTitles, suiteResult.name].join(' '),
16
+ });
17
+ }
7
18
  // Add tests from current suite with current hierarchy
8
19
  for (const test of suiteResult.tests) {
9
20
  tests.push({
@@ -48,10 +59,16 @@ export const runHarnessTestFile = async ({ testPath, globalConfig, projectConfig
48
59
  // Extract setup files from Jest config and convert to relative paths
49
60
  const setupFiles = projectConfig.setupFiles?.map((setupFile) => path.relative(globalConfig.rootDir, setupFile));
50
61
  const setupFilesAfterEnv = projectConfig.setupFilesAfterEnv?.map((setupFile) => path.relative(globalConfig.rootDir, setupFile));
62
+ const testTimeout = session.config.testTimeout ??
63
+ projectConfig
64
+ .testTimeout ??
65
+ globalConfig
66
+ .testTimeout;
51
67
  const harnessResult = await session.runTestFile(relativeTestPath, {
52
68
  testNamePattern: globalConfig.testNamePattern,
53
69
  setupFiles,
54
70
  setupFilesAfterEnv,
71
+ testTimeout,
55
72
  runner: session.context.platform.runner,
56
73
  });
57
74
  const end = Date.now();
@@ -59,14 +76,15 @@ export const runHarnessTestFile = async ({ testPath, globalConfig, projectConfig
59
76
  const stats = calculateStats(allTests);
60
77
  // Convert TestResult[] to the format expected by toTestResult
61
78
  const tests = allTests.map((test) => {
62
- const errorMessage = test.error?.message;
63
79
  const codeFrame = test.error?.codeFrame;
80
+ const errorMessage = formatHarnessErrorMessage(test.error, {
81
+ testStartedAt: test.startedAt,
82
+ });
64
83
  return {
65
84
  duration: test.duration,
66
- errorMessage: errorMessage
67
- ? `${errorMessage}${codeFrame ? `\n\n${codeFrame.content}` : ''}`
68
- : undefined,
85
+ errorMessage,
69
86
  title: test.name,
87
+ fullName: test.fullName,
70
88
  status: test.status,
71
89
  location: codeFrame?.location
72
90
  ? { column: codeFrame.location.column, line: codeFrame.location.row }
@@ -0,0 +1,5 @@
1
+ import type { TestResult as JestTestResult } from '@jest/test-result';
2
+ export declare const getHarnessTestFilePlatform: (testPath: string, knownPlatformIds: ReadonlySet<string>) => string | null;
3
+ export declare const shouldRunHarnessTestFile: (testPath: string, platformId: string, knownPlatformIds: ReadonlySet<string>) => boolean;
4
+ export declare const createPlatformSkippedTestResult: (testPath: string) => JestTestResult;
5
+ //# sourceMappingURL=test-file-platform-filter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test-file-platform-filter.d.ts","sourceRoot":"","sources":["../src/test-file-platform-filter.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAMtE,eAAO,MAAM,0BAA0B,GACrC,UAAU,MAAM,EAChB,kBAAkB,WAAW,CAAC,MAAM,CAAC,KACpC,MAAM,GAAG,IAQX,CAAC;AAEF,eAAO,MAAM,wBAAwB,GACnC,UAAU,MAAM,EAChB,YAAY,MAAM,EAClB,kBAAkB,WAAW,CAAC,MAAM,CAAC,KACpC,OAGF,CAAC;AAEF,eAAO,MAAM,+BAA+B,GAC1C,UAAU,MAAM,KACf,cAyBF,CAAC"}
@@ -0,0 +1,40 @@
1
+ import path from 'node:path';
2
+ import { toTestResult } from './toTestResult.js';
3
+ const PLATFORM_SPECIFIC_HARNESS_FILE = /\.([^.]+)\.harness\.(?:[mc]?[jt]sx?)$/;
4
+ export const getHarnessTestFilePlatform = (testPath, knownPlatformIds) => {
5
+ const match = path.basename(testPath).match(PLATFORM_SPECIFIC_HARNESS_FILE);
6
+ if (!match) {
7
+ return null;
8
+ }
9
+ const candidate = match[1];
10
+ return knownPlatformIds.has(candidate) ? candidate : null;
11
+ };
12
+ export const shouldRunHarnessTestFile = (testPath, platformId, knownPlatformIds) => {
13
+ const filePlatform = getHarnessTestFilePlatform(testPath, knownPlatformIds);
14
+ return filePlatform == null || filePlatform === platformId;
15
+ };
16
+ export const createPlatformSkippedTestResult = (testPath) => {
17
+ const now = Date.now();
18
+ const title = path.basename(testPath);
19
+ return toTestResult({
20
+ stats: {
21
+ failures: 0,
22
+ passes: 0,
23
+ pending: 1,
24
+ todo: 0,
25
+ start: now,
26
+ end: now,
27
+ },
28
+ skipped: true,
29
+ errorMessage: null,
30
+ tests: [
31
+ {
32
+ status: 'skipped',
33
+ title,
34
+ fullName: title,
35
+ testPath,
36
+ },
37
+ ],
38
+ jestTestPath: testPath,
39
+ });
40
+ };
@@ -15,6 +15,7 @@ export type Options = {
15
15
  errorMessage?: string;
16
16
  testPath?: string;
17
17
  title?: string;
18
+ fullName?: string;
18
19
  status: Status;
19
20
  location?: {
20
21
  column: number;
@@ -1 +1 @@
1
- {"version":3,"file":"toTestResult.d.ts","sourceRoot":"","sources":["../src/toTestResult.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE5D,MAAM,MAAM,OAAO,GAAG;IACpB,KAAK,EAAE;QACL,QAAQ,EAAE,MAAM,CAAC;QACjB,MAAM,EAAE,MAAM,CAAC;QACf,OAAO,EAAE,MAAM,CAAC;QAChB,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;QACd,GAAG,EAAE,MAAM,CAAC;KACb,CAAC;IACF,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,KAAK,EAAE,KAAK,CAAC;QACX,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QACzB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,MAAM,EAAE,MAAM,CAAC;QACf,QAAQ,CAAC,EAAE;YACT,MAAM,EAAE,MAAM,CAAC;YACf,IAAI,EAAE,MAAM,CAAC;SACd,CAAC;QACF,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;KAC3B,CAAC,CAAC;IACH,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC;CACnC,CAAC;AAwDF,eAAO,MAAM,YAAY,GAAI,SAAS,OAAO,KAAG,UAiB/C,CAAC"}
1
+ {"version":3,"file":"toTestResult.d.ts","sourceRoot":"","sources":["../src/toTestResult.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE5D,MAAM,MAAM,OAAO,GAAG;IACpB,KAAK,EAAE;QACL,QAAQ,EAAE,MAAM,CAAC;QACjB,MAAM,EAAE,MAAM,CAAC;QACf,OAAO,EAAE,MAAM,CAAC;QAChB,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;QACd,GAAG,EAAE,MAAM,CAAC;KACb,CAAC;IACF,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,KAAK,EAAE,KAAK,CAAC;QACX,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QACzB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,MAAM,EAAE,MAAM,CAAC;QACf,QAAQ,CAAC,EAAE;YACT,MAAM,EAAE,MAAM,CAAC;YACf,IAAI,EAAE,MAAM,CAAC;SACd,CAAC;QACF,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;KAC3B,CAAC,CAAC;IACH,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC;CACnC,CAAC;AAwDF,eAAO,MAAM,YAAY,GAAI,SAAS,OAAO,KAAG,UAiB/C,CAAC"}
@@ -36,8 +36,8 @@ const getTestResults = ({ errorMessage, tests, jestTestPath, }) => {
36
36
  duration: test.duration,
37
37
  failureDetails: [],
38
38
  failureMessages: actualErrorMessage ? [actualErrorMessage] : [],
39
- fullName: jestTestPath || test.testPath || '',
40
- numPassingAsserts: test.errorMessage ? 1 : 0,
39
+ fullName: test.fullName || test.testPath || jestTestPath || '',
40
+ numPassingAsserts: test.status === 'passed' ? 1 : 0,
41
41
  status: test.status,
42
42
  title: test.title || '',
43
43
  location: test.location,