mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
5c2b9eda69
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/52777 Changelog: [internal] This significantly speeds up test execution in Fantom (around 2x in OSS and 6x at Meta) by starting a Metro server before all tests runs and reusing it across all tests to build test bundles, instead of spinning up a new Metro instance every time we run each test. The architecture change (also considering the previous change in buck prebuilds) looks like this: {F1980689532} This is how is impacts execution times (compared to the baseline): * OSS * Before: 62s {F1980564286} * After: 30s (**2x faster**) {F1980564265} Reviewed By: andrewdacenko Differential Revision: D78741903 fbshipit-source-id: b209f88925e49cc2a2067e8df9b7fa9a29b4c8d2
20 lines
489 B
Bash
Executable File
20 lines
489 B
Bash
Executable File
#!/bin/bash
|
|
# 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.
|
|
|
|
set -e
|
|
|
|
|
|
if [[ -f "BUCK" && -z "$FANTOM_FORCE_OSS_BUILD" ]]; then
|
|
export JS_DIR='..'
|
|
else
|
|
yarn workspace @react-native/fantom build
|
|
export FANTOM_FORCE_OSS_BUILD=1
|
|
fi
|
|
|
|
export NODE_OPTIONS='--max-old-space-size=8192'
|
|
|
|
yarn jest --config private/react-native-fantom/config/jest.config.js "$@"
|