mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-24 12:25:59 +08:00
Use native as the source of truth to decide if a test should use Fabric
Reviewed By: fkgozali Differential Revision: D7304221 fbshipit-source-id: cdd7053e6ce6522474df261db5710e2d9c013be6
This commit is contained in:
committed by
Facebook Github Bot
parent
0d924dd629
commit
785c8f7eb9
24
Libraries/Components/View/TestFabricView.js
Normal file
24
Libraries/Components/View/TestFabricView.js
Normal file
@@ -0,0 +1,24 @@
|
||||
/**
|
||||
* Copyright (c) 2015-present, Facebook, Inc.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @providesModule TestFabricView
|
||||
* @flow
|
||||
* @format
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* This is a switch on the correct View to use for Fabric testing purposes
|
||||
*/
|
||||
let TestFabricView;
|
||||
const FabricTestModule = require('NativeModules').FabricTestModule;
|
||||
if (FabricTestModule && FabricTestModule.IS_FABRIC_ENABLED) {
|
||||
TestFabricView = require('FabricView');
|
||||
} else {
|
||||
TestFabricView = require('View');
|
||||
}
|
||||
|
||||
module.exports = TestFabricView;
|
||||
Reference in New Issue
Block a user