Skip to content

Commit

Permalink
Globally disable LayoutAnimation during Snapshot Tests
Browse files Browse the repository at this point in the history
Summary: LayoutAnimation is one source of flakiness in SSTs. Disable it globally in the SST apps.

Reviewed By: ejanzer

Differential Revision: D13791987

fbshipit-source-id: 0ebfd79fb31d235680c0d84f4b06d5a98c35260a
  • Loading branch information
Peter Argany authored and facebook-github-bot committed Jan 24, 2019
1 parent 67e7f16 commit 527fc9d
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions Libraries/LayoutAnimation/LayoutAnimation.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

'use strict';

import Platform from 'Platform';
const UIManager = require('UIManager');

type Type =
Expand Down Expand Up @@ -42,13 +43,15 @@ function configureNext(
config: LayoutAnimationConfig,
onAnimationDidEnd?: Function,
) {
UIManager.configureNextLayoutAnimation(
config,
onAnimationDidEnd ?? function() {},
function() {
/* unused */
},
);
if (!Platform.isTesting) {
UIManager.configureNextLayoutAnimation(
config,
onAnimationDidEnd ?? function() {},
function() {
/* unused */
},
);
}
}

function create(
Expand Down

0 comments on commit 527fc9d

Please sign in to comment.