-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Error: Performance.mark is not a function #1308
Comments
I would recommend not migrating two things at once. Get react 15 and enzyme 3 working first; then upgrade to react 16. |
@ljharb I've migrated react first, application is working without any issues. the migration was smooth and easy. all of my e2e tests pass just fine. the only problem is with enzyme throwing this error |
Right, but if you don't have enzyme 3 passing on react 15 first, then we can't know if it's react 16 breaking things (which might be expected), or if it's enzyme 3 breaking things. |
Unit tests passing are much more important than e2e tests anyways. |
I'm subscribing to this thread as having a similar issue. I haven't figured out how such error is even possible given the defensive check React is using: https://github.com/facebook/react/blob/v16.0.0/src/renderers/shared/fiber/ReactDebugFiberPerf.js#L42. |
Ok, I have found the root cause. It's coming from the usage of |
I think that we can close this issue. Here is another one: sinonjs/fake-timers#136. |
@reyraa are you also using sinon and useFakeTimers? |
@ljharb Yes we're using fake timers in multiple tests. and @oliviertassinari yes the problem stemmes in our |
Here is a workaround that worked for me sinonjs/fake-timers#136 (comment) |
Hi,
What am I doing?
I'm trying to migrate from react 15 to react 16, consequently migrate from enzyme v2.x to v3.x. I have about 500 unit tests in which I use enzyme to mount my component. I followed Migration Guide and faced this error in over 100 tests:
The error I hit:
I've tried to fix the issue reducing the number of tests I run every time, it doesn't seem to help.
Application specs:
react
: 16.0.0react-dom
: 16.0.0Enzyme
: 3.1.0react-test-renderer
: 16.0.0Any help would be appreciated.
The text was updated successfully, but these errors were encountered: