mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
a4c2007068
Summary: Adds `flow` (or `noflow`) to all files in this directory and ensures that Flow succeeds (by adding type annotations, using minor refactors, or suppressing errors due to intentionally dynamic logic). This will help improve type safety when making changes both in these files as well as files that these depend on. Changelog: [Internal] Pull Request resolved: https://github.com/facebook/react-native/pull/51652 Test Plan: Ran Flow and Jest tests successfully: ``` $ yarn flow $ yarn test ``` Ran a Jest unit test internally to make sure they work with our internal environment setup: ``` $ cd ~/fbsource $ js1 test /View-test.js ``` Reviewed By: javache Differential Revision: D75488160 Pulled By: yungsters fbshipit-source-id: 536cef9699acfa1edcd3dcf61c53ebcd92f560f9
28 lines
597 B
JavaScript
28 lines
597 B
JavaScript
/**
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*
|
|
* @flow strict
|
|
* @format
|
|
*/
|
|
|
|
const MockNativeMethods = {
|
|
measure: jest.fn(),
|
|
measureInWindow: jest.fn(),
|
|
measureLayout: jest.fn(),
|
|
setNativeProps: jest.fn(),
|
|
focus: jest.fn(),
|
|
blur: jest.fn(),
|
|
} as {
|
|
measure: () => void,
|
|
measureInWindow: () => void,
|
|
measureLayout: () => void,
|
|
setNativeProps: () => void,
|
|
focus: () => void,
|
|
blur: () => void,
|
|
};
|
|
|
|
export default MockNativeMethods;
|