/
githubmr
/
facebook-react-native
Обзор
Документация
Войти
/
githubmr
/
facebook-react-native
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
main
packages/react-native/src/private/testing/fantom/specs/NativeFantomTestSpecificMethods.js
31 строка
1 KB
Rubén Norte
Add Fantom benchmark for RuntimeScheduler (#52189)
23 июн 2025, 18:34
23 июн 2025, 18:34
5742227
Код
Авторство
О чём код?
/** * 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 */ import type {TurboModule} from '../../../../../Libraries/TurboModule/RCTExport'; import * as TurboModuleRegistry from '../../../../../Libraries/TurboModule/TurboModuleRegistry'; /** * This native module provides test-specific helpers that run native code * that isn't provided by React Native and cannot be specified in JavaScript * (e.g.: to test native hooks that don't have a consumer in any built-in APIs, * or call into methods that host platforms would generally call into). * * Feel free to add more methods here as needed by your tests, but make sure * that this is the only way to test the behavior. */ export interface Spec extends TurboModule { +registerForcedCloneCommitHook: () => void; +takeFunctionAndNoop: (fn: () => void) => void; } export default (TurboModuleRegistry.getEnforcing<Spec>( 'NativeFantomTestSpecificMethodsCxx', ): Spec);