Skip to content

Commit

Permalink
test(snackbar): call open and close animation function with params
Browse files Browse the repository at this point in the history
  • Loading branch information
evilamaior committed May 24, 2022
1 parent 9f037cd commit b86a7cf
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions packages/yoga/src/Snackbar/native/Snackbar.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,18 @@ describe('<Snackbar />', () => {

fireEvent.press(getByText('Tap to open snackbar'));

expect(RN.Animated.spring).toBeCalled();
expect(RN.Animated.spring.mock.calls[0][1]).toEqual({
toValue: 0,
bounciness: 0,
useNativeDriver: true,
});

fireEvent.press(getByText('Action'));

expect(RN.Animated.spring).toBeCalled();
expect(RN.Animated.spring.mock.calls[1][1]).toEqual({
toValue: 200,
bounciness: 0,
useNativeDriver: true,
});
});
});

0 comments on commit b86a7cf

Please sign in to comment.