diff --git a/private/react-native-fantom/src/Benchmark.js b/private/react-native-fantom/src/Benchmark.js index a4b8af047b79..f93912bc967e 100644 --- a/private/react-native-fantom/src/Benchmark.js +++ b/private/react-native-fantom/src/Benchmark.js @@ -215,7 +215,9 @@ export function suite( 'Failing focused test to prevent it from being committed', ); } - reportBenchmarkResult(createBenchmarkResultsObject(bench, tasks)); + if (!isTestOnly) { + reportBenchmarkResult(createBenchmarkResultsObject(bench, tasks)); + } }); const test = (name: string, fn: SyncFn, options?: FnOptions): SuiteAPI => { diff --git a/scripts/fantom.sh b/scripts/fantom.sh index 0b34f9807d28..5d4be07aa77c 100755 --- a/scripts/fantom.sh +++ b/scripts/fantom.sh @@ -27,4 +27,8 @@ for arg in "$@"; do esac done +if [[ -n "$FANTOM_RUN_BENCHMARKS" ]]; then + ARGS+=("--runInBand") +fi + yarn jest --config private/react-native-fantom/config/jest.config.js "${ARGS[@]}"