Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: move jest-circus/ facade to jest/ #3400

Merged
merged 1 commit into from
May 17, 2022
Merged

Conversation

noomorph
Copy link
Collaborator

@noomorph noomorph commented May 16, 2022

Description

In this PR, since there is only single integration with jest and jest-circus, and the latter is a default choice for Jest 27, and the only choice for Jest 28 (unless jest-jasmine2 is installed and configured explicitly), I consider it justified to shorten the paths to the user-facing files.

Required changes from the users

In the environment class file:

 const {
   DetoxCircusEnvironment,
   SpecReporter,
   WorkerAssignReporter,
-} = require('detox/runners/jest-circus');
+} = require('detox/runners/jest');

In Jest config:

   "testTimeout": 120000,
-  "reporters": ["detox/runners/jest/streamlineReporter"],
+  "reporters": ["detox/runners/jest/reporter"],
   "verbose": true

Migration flow

As for the attempts to import the files at their old locations, the users will be seeing warnings:

[DEPRECATION] Detox detected an attempt to require a module from an outdated location, please change in your project:
- detox/runners/jest-circus/environment
+ detox/runners/jest/environment

That should enact the migration process smoothly enough.

For features/enhancements:

  • I have added/updated the relevant references in the documentation files.

@d4vidi
Copy link
Collaborator

d4vidi commented May 17, 2022

@noomorph kudos for finding those building blocks that allow moving forward with this in a step-by-step fashion ❤️

@noomorph noomorph marked this pull request as ready for review May 17, 2022 11:00
@noomorph noomorph requested a review from d4vidi as a code owner May 17, 2022 11:00
@noomorph noomorph merged commit 66e8f6c into next May 17, 2022
@noomorph noomorph deleted the build/change-jest-facade branch May 17, 2022 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants