Reviewed By: bhamodi Differential Revision: D33331422 fbshipit-source-id: 016e8dcc0c0c7f1fc353a348b54fda0d5e2ddc01
30 lines
729 B
JavaScript
30 lines
729 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.
|
|
*
|
|
* @format
|
|
*/
|
|
|
|
const isFB = require('./isFB');
|
|
|
|
if (isFB && process.env.FLIPPER_FB === undefined) {
|
|
process.env.FLIPPER_FB = 'true';
|
|
}
|
|
process.env.FLIPPER_TEST_RUNNER = 'true';
|
|
|
|
// eslint-disable-next-line import/no-unresolved,flipper/no-relative-imports-across-packages
|
|
const {transform} = require('../babel-transformer/lib/transform-jest');
|
|
|
|
module.exports = {
|
|
process(src, filename, config, options) {
|
|
return transform({
|
|
src,
|
|
filename,
|
|
config,
|
|
options: {...options, isTestRunner: true},
|
|
});
|
|
},
|
|
};
|