From 527fc9d1920f3a11088ab9a020651506958135a4 Mon Sep 17 00:00:00 2001 From: Peter Argany Date: Thu, 24 Jan 2019 15:20:02 -0800 Subject: [PATCH] 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 --- Libraries/LayoutAnimation/LayoutAnimation.js | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/Libraries/LayoutAnimation/LayoutAnimation.js b/Libraries/LayoutAnimation/LayoutAnimation.js index 6f0fed1c0..0b84dd5fe 100644 --- a/Libraries/LayoutAnimation/LayoutAnimation.js +++ b/Libraries/LayoutAnimation/LayoutAnimation.js @@ -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(