2022-12-28 01:27:12 -08:00
|
|
|
/**
|
|
|
|
* 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
|
|
|
|
*/
|
|
|
|
|
2023-05-09 15:35:42 -07:00
|
|
|
import type {Config} from 'jest';
|
2023-05-04 08:11:04 -07:00
|
|
|
|
|
|
|
const config: Config = {
|
2023-05-09 15:35:42 -07:00
|
|
|
setupFiles: ['./jest.setup.ts'],
|
|
|
|
testRegex: '/tests/.*\\.test\\.[jt]s$',
|
2023-05-10 22:46:39 -07:00
|
|
|
moduleNameMapper: {
|
|
|
|
'yoga-layout':
|
|
|
|
process.env['SYNC'] === '1' && process.env['WASM'] === '1'
|
|
|
|
? 'yoga-layout/wasm-sync'
|
|
|
|
: process.env['SYNC'] === '1'
|
|
|
|
? 'yoga-layout/asmjs-sync'
|
|
|
|
: process.env['WASM'] === '1'
|
|
|
|
? 'yoga-layout/wasm-async'
|
|
|
|
: 'yoga-layout/asmjs-async',
|
|
|
|
},
|
2022-12-28 01:27:12 -08:00
|
|
|
};
|
2023-05-04 08:11:04 -07:00
|
|
|
|
|
|
|
export default config;
|