-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
We've encountered what we believe is a bug in the currents.dev reporters when using detox + jest to test our React native app:
Running detox with --retries 1 (or another positive integer) causes it to invoke a new jest runner with just the failing tests, if any tests fail. The currents.dev report then only ends up containing the tests for this re-run, and thus omitting all prior successful tests from the report.
We run detox & jest via
pnpm exec detox test --configuration ios.sim.release -l info --retries 1 --headless --cleanupRemoving --retries 1 from the invocation avoids the issue.
Sample output
.............
Test Suites: 2 failed, 4 skipped, 16 passed, 18 of 22 total
Tests: 6 failed, 13 skipped, 37 passed, 56 total
Snapshots: 0 total
Time: 1217.981 s
Ran all test suites.
04:02:02.147 detox[70031] i [currents]: Run completed
04:02:02.273 detox[70025] E Command failed with exit code = 1:
jest --config jest.config.js
04:02:02.273 detox[70025] i There were failing tests in the following files:
1. specs/foo.test.ts
2. specs/bar.test.ts
Detox CLI is going to restart the test runner with those files...
04:02:02.274 detox[70025] B jest --config jest.config.js /my-app-root/specs/foo.test.ts /my-app-root/specs/bar.test.ts
.............
Test Suites: 1 failed, 1 passed, 2 total
Tests: 5 failed, 1 passed, 6 total
Snapshots: 0 total
Time: 116.509 s, estimated 117 s
Ran all test suites matching /my-app-root/specs/foo.test.ts|/my-app-root/specs/bar.test.ts.
04:03:59.588 detox[74303] i [currents]: Run completed
The currents.dev report for the above run only included the tests from the retry re-run:
jest.config.js
/** @type {import('@jest/types').Config.InitialOptions} */
module.exports = {
preset: 'ts-jest',
rootDir: '.',
moduleNameMapper: {
'^#e2e/(.*)$': '<rootDir>/$1',
},
testMatch: ['<rootDir>/specs/**/*.test.ts'],
testTimeout: 180000,
maxWorkers: 1,
globalSetup: 'detox/runners/jest/globalSetup',
globalTeardown: 'detox/runners/jest/globalTeardown',
reporters: [
'detox/runners/jest/reporter',
!!process.env.CI && '@currents/jest',
!!process.env.CI && 'github-actions',
].filter(Boolean),
testEnvironment: 'detox/runners/jest/testEnvironment',
verbose: true,
silent: false,
}Versions
- @currents/cmd 1.9.5
- @currents/jest 1.2.3
- detox 20.46.0
- jest 30.2.0
Metadata
Metadata
Assignees
Labels
No labels