You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I initially thought that this problem could have something to do with Jest, but according to jestjs/jest#5173 it's more likely that either Enzyme and/or React are the source of it after updating from React 15 to React 16.
Current behavior
To briefly describe what's happening - Jest seems to be generating a snapshot immediately instead of waiting for jest.runTimersToTime to run (I'm not sure if there is actually a correlation between these 2 things or not).
This test snapshot output (https://travis-ci.org/ndresx/react-countdown/builds/320673265#L534) shows that the number changed from 6 to 10 seconds after jest.runTimersToTime(6000); was called, while nothing in the code itself was changed, just an update of the packages happened.
Although the state value assertion passes with the expected value of 6 at this point (the value is directly rendered via render),
the snapshot seems to be taken before the time gets actually changed and writes 10 instead.
Before the update of React, the tests were passing. If you need more info, please let me know.
Expected behavior
The value in the snapshot should still be 6 => not change.
Your environment
API
shallow
mount
render
Version
library
version
Enzyme
3.3.0
React
16.2.0
Adapter
enzyme-adapter-react-16
enzyme-adapter-react-15
enzyme-adapter-react-15.4
enzyme-adapter-react-14
enzyme-adapter-react-13
enzyme-adapter-react-helper
others ( )
The text was updated successfully, but these errors were encountered:
I initially thought that this problem could have something to do with Jest, but according to jestjs/jest#5173 it's more likely that either Enzyme and/or React are the source of it after updating from React 15 to React 16.
Current behavior
To briefly describe what's happening - Jest seems to be generating a snapshot immediately instead of waiting for
jest.runTimersToTime
to run (I'm not sure if there is actually a correlation between these 2 things or not).This test snapshot output (https://travis-ci.org/ndresx/react-countdown/builds/320673265#L534) shows that the number changed from 6 to 10 seconds after
jest.runTimersToTime(6000);
was called, while nothing in the code itself was changed, just an update of the packages happened.Although the
state
value assertion passes with the expected value of 6 at this point (the value is directly rendered viarender
),the snapshot seems to be taken before the time gets actually changed and writes 10 instead.
Before the update of React, the tests were passing. If you need more info, please let me know.
Expected behavior
The value in the snapshot should still be 6 => not change.
Your environment
API
Version
Adapter
The text was updated successfully, but these errors were encountered: