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

Please fix jest !! #3357

Closed
billnbell opened this issue Jul 4, 2022 · 2 comments
Closed

Please fix jest !! #3357

billnbell opened this issue Jul 4, 2022 · 2 comments
Labels
Missing info The user didn't precise the problem enough Repro provided A reproduction with a snippet of code, snack or repo is provided

Comments

@billnbell
Copy link

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch react-native-reanimated@2.9.1 for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/react-native-reanimated/lib/reanimated2/jestUtils.js b/node_modules/react-native-reanimated/lib/reanimated2/jestUtils.js
index 5ae42ec..8c7f631 100644
--- a/node_modules/react-native-reanimated/lib/reanimated2/jestUtils.js
+++ b/node_modules/react-native-reanimated/lib/reanimated2/jestUtils.js
@@ -145,7 +145,7 @@ export const advanceAnimationByFrame = (count) => {
     jest.advanceTimersByTime(frameTime);
 };
 export const setUpTests = (userConfig = {}) => {
-    const expect = require('expect');
+    const { expect } = require('@jest/globals');
     require('setimmediate');
     frameTime = Math.round(1000 / config.fps);
     config = Object.assign(Object.assign({}, config), userConfig);

This issue body was partially generated by patch-package.

@github-actions github-actions bot added the Missing info The user didn't precise the problem enough label Jul 4, 2022
@github-actions
Copy link

github-actions bot commented Jul 4, 2022

Hey! 👋

It looks like you've omitted a few important sections from the issue template.

Please complete Description, Snack or minimal code example, Package versions and Affected platforms sections.

@github-actions github-actions bot added the Repro provided A reproduction with a snippet of code, snack or repo is provided label Jul 4, 2022
@piaskowyk
Copy link
Member

It has been fixed already but we haven't released it yet. More info here - #3347

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Missing info The user didn't precise the problem enough Repro provided A reproduction with a snippet of code, snack or repo is provided
Projects
None yet
Development

No branches or pull requests

2 participants