Reorganise for easier extraction
Summary: To make the DataSource abstraction reusable for other teams and an upcoming talk, this diff moves all DataSource storage & virtualization logic in one folder. Will set up a build process and demo project in later diffs. Reviewed By: nikoant Differential Revision: D28056700 fbshipit-source-id: 7cfe5b40bbbe387da711f765a604a45029d451c7
This commit is contained in:
committed by
Facebook GitHub Bot
parent
5a7d4e2f17
commit
84e2646909
16
desktop/flipper-plugin/src/utils/useInUnitTest.tsx
Normal file
16
desktop/flipper-plugin/src/utils/useInUnitTest.tsx
Normal file
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @format
|
||||
*/
|
||||
|
||||
/**
|
||||
* Check if we are currently running a unit test.
|
||||
* Use this hook to disable certain functionality that is probably not going to work as expected in the JSDom implementaiton
|
||||
*/
|
||||
export function useInUnitTest(): boolean {
|
||||
return process.env.NODE_ENV === 'test';
|
||||
}
|
||||
Reference in New Issue
Block a user