Files
react-native/Libraries/BatchedBridge/__mocks__/MessageQueueTestConfig.js
T
Moti Zilberman 37bbfa663d Add test for sync methods (type=sync)
Summary: Adds a test for synchronous methods (`type === 'sync'`) in NativeModules. This doesn't modify any behaviour.

Reviewed By: amnn

Differential Revision: D15804757

fbshipit-source-id: 4db76dbd0b0b111ed9311d4b7ec35a077c377f01
2019-06-19 09:15:14 -07:00

39 lines
900 B
JavaScript

/**
* 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.
*
* These don't actually exist anywhere in the code.
*
* @flow strict-local
* @format
*/
'use strict';
import type {ModuleConfig} from '../NativeModules';
const remoteModulesConfig: $ReadOnlyArray<ModuleConfig> = [
[
'RemoteModule1',
null,
['remoteMethod', 'promiseMethod', 'promiseReturningMethod', 'syncMethod'],
[2 /* promiseReturningMethod */],
[3 /* syncMethod */],
],
[
'RemoteModule2',
null,
['remoteMethod', 'promiseMethod', 'promiseReturningMethod', 'syncMethod'],
[2 /* promiseReturningMethod */],
[3 /* syncMethod */],
],
];
const MessageQueueTestConfig = {
remoteModuleConfig: remoteModulesConfig,
};
module.exports = MessageQueueTestConfig;