mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-01-12 22:50:10 +08:00
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:
committed by
Facebook Github Bot
parent
67e7f16944
commit
527fc9d192
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user