Skip to content

Commit

Permalink
fix(animation): with animator hoc class settings combine support
Browse files Browse the repository at this point in the history
  • Loading branch information
romelperez committed Feb 10, 2021
1 parent fc2db15 commit 60274e2
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ test('Should filter flow activation values', () => {
'animate',
'root',
'merge',
'combine',
'manager',
'useAnimateMount',
'useAnimateEntering',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const CLASS_ALLOWED_SETTINGS = [
'animate',
'root',
'merge',
'combine',
'manager',
'useAnimateMount',
'useAnimateEntering',
Expand Down
15 changes: 15 additions & 0 deletions packages/animation/src/withAnimator/withAnimator.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,21 @@ test('Should "animator.merge" setting take priority in instance setting', () =>
expect(animator).toMatchObject({ merge: false });
});

test('Should "animator.combine" setting take priority in instance setting', () => {
let animator: any;
const ExampleComponent: FC<ExampleComponentWithAnimatorProps> = props => {
animator = props.animator;
return null;
};
const ExampleNode = withAnimator({ combine: true })(ExampleComponent);
render(
<Animator>
<ExampleNode animator={{ combine: false }} />
</Animator>
);
expect(animator).toMatchObject({ combine: false });
});

test('Should "animator.manager" setting take priority in instance setting', () => {
let animator: any;
const ExampleComponent: FC<ExampleComponentWithAnimatorProps> = props => {
Expand Down

0 comments on commit 60274e2

Please sign in to comment.