Globally disable LayoutAnimation during Snapshot Tests

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
This commit is contained in:
Peter Argany
2019-01-24 15:20:02 -08:00
committed by Facebook Github Bot
parent 67e7f16944
commit 527fc9d192

View File

@@ -10,6 +10,7 @@
'use strict';
import Platform from 'Platform';
const UIManager = require('UIManager');
type Type =
@@ -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(