@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.
- package/dist/__tests__/bridge.test.js +29 -4
- package/dist/__tests__/crash-monitor.test.js +194 -176
- package/dist/__tests__/environment-reset.test.d.ts +2 -0
- package/dist/__tests__/environment-reset.test.d.ts.map +1 -0
- package/dist/__tests__/environment-reset.test.js +238 -0
- package/dist/__tests__/errors.test.js +39 -0
- package/dist/__tests__/execute-run.test.js +439 -29
- package/dist/__tests__/format-harness-error.test.d.ts +2 -0
- package/dist/__tests__/format-harness-error.test.d.ts.map +1 -0
- package/dist/__tests__/format-harness-error.test.js +27 -0
- package/dist/__tests__/harness-cache.test.js +62 -41
- package/dist/__tests__/harness-session-signal.test.d.ts +2 -0
- package/dist/__tests__/harness-session-signal.test.d.ts.map +1 -0
- package/dist/__tests__/harness-session-signal.test.js +298 -0
- package/dist/__tests__/harness-session.test.js +217 -234
- package/dist/__tests__/index.test.js +62 -11
- package/dist/__tests__/metro-port.test.js +2 -0
- package/dist/__tests__/run.test.d.ts +2 -0
- package/dist/__tests__/run.test.d.ts.map +1 -0
- package/dist/__tests__/run.test.js +48 -0
- package/dist/__tests__/test-file-platform-filter.test.d.ts +2 -0
- package/dist/__tests__/test-file-platform-filter.test.d.ts.map +1 -0
- package/dist/__tests__/test-file-platform-filter.test.js +47 -0
- package/dist/crash-monitor.d.ts +12 -4
- package/dist/crash-monitor.d.ts.map +1 -1
- package/dist/crash-monitor.js +135 -102
- package/dist/diagnostics/__tests__/derivers.test.d.ts +2 -0
- package/dist/diagnostics/__tests__/derivers.test.d.ts.map +1 -0
- package/dist/diagnostics/__tests__/derivers.test.js +248 -0
- package/dist/diagnostics/__tests__/report.test.d.ts +2 -0
- package/dist/diagnostics/__tests__/report.test.d.ts.map +1 -0
- package/dist/diagnostics/__tests__/report.test.js +97 -0
- package/dist/diagnostics/derivers.d.ts +24 -0
- package/dist/diagnostics/derivers.d.ts.map +1 -0
- package/dist/diagnostics/derivers.js +146 -0
- package/dist/diagnostics/index.d.ts +3 -0
- package/dist/diagnostics/index.d.ts.map +1 -0
- package/dist/diagnostics/index.js +2 -0
- package/dist/diagnostics/report.d.ts +7 -0
- package/dist/diagnostics/report.d.ts.map +1 -0
- package/dist/diagnostics/report.js +84 -0
- package/dist/environment-reset.d.ts +51 -0
- package/dist/environment-reset.d.ts.map +1 -0
- package/dist/environment-reset.js +83 -0
- package/dist/errors.d.ts +10 -0
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +41 -2
- package/dist/execute-run.d.ts +4 -2
- package/dist/execute-run.d.ts.map +1 -1
- package/dist/execute-run.js +179 -49
- package/dist/format-harness-error.d.ts +5 -0
- package/dist/format-harness-error.d.ts.map +1 -0
- package/dist/format-harness-error.js +43 -0
- package/dist/harness-session.d.ts +46 -1
- package/dist/harness-session.d.ts.map +1 -1
- package/dist/harness-session.js +386 -118
- package/dist/index.d.ts +7 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +24 -2
- package/dist/run.d.ts.map +1 -1
- package/dist/run.js +22 -4
- package/dist/test-file-platform-filter.d.ts +5 -0
- package/dist/test-file-platform-filter.d.ts.map +1 -0
- package/dist/test-file-platform-filter.js +40 -0
- package/dist/toTestResult.d.ts +1 -0
- package/dist/toTestResult.d.ts.map +1 -1
- package/dist/toTestResult.js +2 -2
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/package.json +8 -7
- package/src/__tests__/bridge.test.ts +45 -5
- package/src/__tests__/crash-monitor.test.ts +234 -199
- package/src/__tests__/environment-reset.test.ts +308 -0
- package/src/__tests__/errors.test.ts +75 -0
- package/src/__tests__/execute-run.test.ts +561 -37
- package/src/__tests__/format-harness-error.test.ts +32 -0
- package/src/__tests__/harness-cache.test.ts +91 -0
- package/src/__tests__/harness-session.test.ts +303 -0
- package/src/__tests__/index.test.ts +92 -12
- package/src/__tests__/metro-port.test.ts +2 -0
- package/src/__tests__/run.test.ts +74 -0
- package/src/__tests__/test-file-platform-filter.test.ts +83 -0
- package/src/crash-monitor.ts +220 -131
- package/src/diagnostics/__tests__/derivers.test.ts +300 -0
- package/src/diagnostics/__tests__/report.test.ts +128 -0
- package/src/diagnostics/derivers.ts +170 -0
- package/src/diagnostics/index.ts +2 -0
- package/src/diagnostics/report.ts +124 -0
- package/src/environment-reset.ts +138 -0
- package/src/errors.ts +62 -1
- package/src/execute-run.ts +230 -57
- package/src/format-harness-error.ts +73 -0
- package/src/harness-session.ts +535 -162
- package/src/index.ts +40 -11
- package/src/run.ts +24 -4
- package/src/test-file-platform-filter.ts +57 -0
- package/src/toTestResult.ts +3 -2
- package/tsconfig.json +3 -0
- package/tsconfig.lib.json +3 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
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
|
-
|
|
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
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,
|
|
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
|
-
|
|
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,
|
|
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;
|
|
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
|
|
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
|
+
};
|
package/dist/toTestResult.d.ts
CHANGED
|
@@ -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"}
|
package/dist/toTestResult.js
CHANGED
|
@@ -36,8 +36,8 @@ const getTestResults = ({ errorMessage, tests, jestTestPath, }) => {
|
|
|
36
36
|
duration: test.duration,
|
|
37
37
|
failureDetails: [],
|
|
38
38
|
failureMessages: actualErrorMessage ? [actualErrorMessage] : [],
|
|
39
|
-
fullName:
|
|
40
|
-
numPassingAsserts: test.
|
|
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,
|