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

Start using Jest's "modern" fake-timer implementation. #29767

Closed
chrisbobbe opened this issue Aug 25, 2020 · 5 comments
Closed

Start using Jest's "modern" fake-timer implementation. #29767

chrisbobbe opened this issue Aug 25, 2020 · 5 comments
Labels
Needs: Issue Manager Attention Stale There has been a lack of activity on this issue and it may be closed soon. Type: Enhancement A new feature or enhancement of an existing feature.

Comments

@chrisbobbe
Copy link

chrisbobbe commented Aug 25, 2020

Recent improvements have been made to Jest's implementation of fake timers, on an opt-in basis, with a plan to make them the default in the future: jestjs/jest#7776.

Some prep work has been done toward this (#29011), but I don't find an existing issue for the actual change.

Simply flipping the switch to the "modern" implementation gives several test failures, likely due to some combination of

I'm excited for facebook/react-native's own tests to be made more correct, but I particularly hope to draw attention to the fact that React Native apps can't currently use the new implementation (jestjs/jest#10221, #29303, #29754). This is a problem for apps that can't use the legacy implementation either, because of its issues (not having Date.now() faked is a big one).

React Native version:

v0.61.5. (See #29767 (comment), below, for more environment info.)

@react-native-bot react-native-bot added Needs: Author Feedback Needs: Environment Info Please run `react-native info` and edit your issue with that command's output. and removed Needs: Triage 🔍 labels Aug 25, 2020
@github-actions
Copy link

⚠️ Missing Environment Information
ℹ️ Your issue may be missing information about your development environment. You can obtain the missing information by running react-native info in a console.

@chrisbobbe
Copy link
Author

Ah, here's the missing environment info for the bot 🙂:

System:
    OS: macOS 10.15.6
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
    Memory: 2.87 GB / 16.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 12.13.1 - ~/.nvm/versions/node/v12.13.1/bin/node
    Yarn: 1.22.4 - /usr/local/bin/yarn
    npm: 6.12.1 - ~/.nvm/versions/node/v12.13.1/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  SDKs:
    iOS SDK:
      Platforms: iOS 13.7, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2
    Android SDK:
      API Levels: 23, 25, 26, 27, 28, 29
      Build Tools: 27.0.3, 28.0.3, 29.0.2
      System Images: android-28 | Google Play Intel x86 Atom
  IDEs:
    Android Studio: 3.6 AI-192.7142.36.36.6241897
    Xcode: 11.7/11E801a - /usr/bin/xcodebuild
  npmPackages:
    react: 16.9.0 => 16.9.0 
    react-native: 0.61.5 => 0.61.5

@github-actions github-actions bot added Needs: Attention Issues where the author has responded to feedback. and removed Needs: Author Feedback labels Sep 11, 2020
@react-native-bot react-native-bot removed the Needs: Environment Info Please run `react-native info` and edit your issue with that command's output. label Sep 18, 2020
@safaiyeh safaiyeh added Type: Enhancement A new feature or enhancement of an existing feature. Needs: Issue Manager Attention and removed Needs: Attention Issues where the author has responded to feedback. labels Oct 28, 2020
@safaiyeh
Copy link
Contributor

Hi @chrisbobbe thanks for the request & all the details.

You opened a PR here: https://github.com/facebook/react-native/pull/29754/files

Would this resolve the Jest issue, if merged in?

@github-actions
Copy link

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Jun 30, 2023
@github-actions
Copy link

github-actions bot commented Jul 7, 2023

This issue was closed because it has been stalled for 7 days with no activity.

@github-actions github-actions bot closed this as completed Jul 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs: Issue Manager Attention Stale There has been a lack of activity on this issue and it may be closed soon. Type: Enhancement A new feature or enhancement of an existing feature.
Projects
None yet
Development

No branches or pull requests

3 participants