mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
07b34f4ca3
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/47612 Changelog: [internal] Just using babel-register so we can use Flow types in the code for the RN integration tests runner. Reviewed By: sammy-SC Differential Revision: D65948801 fbshipit-source-id: 6c54b0463fe4b71c818ff1c4faa973cc8b13b5d2
36 lines
767 B
JavaScript
36 lines
767 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-local
|
|
* @format
|
|
* @oncall react_native
|
|
*/
|
|
|
|
module.exports = function entrypointTemplate({
|
|
testPath,
|
|
setupModulePath,
|
|
}: {
|
|
testPath: string,
|
|
setupModulePath: string,
|
|
}): string {
|
|
return `/**
|
|
* 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.
|
|
*
|
|
* ${'@'}generated
|
|
* @noformat
|
|
* @noflow
|
|
* @oncall react_native
|
|
*/
|
|
|
|
import {registerTest} from '${setupModulePath}';
|
|
|
|
registerTest(() => require('${testPath}'));
|
|
`;
|
|
};
|