From b1772de4095704022fd5aef02b7b6592bc335f2b Mon Sep 17 00:00:00 2001 From: Nick Lefever Date: Mon, 19 May 2025 03:06:53 -0700 Subject: [PATCH] Make default mode used for benchmarks more obvious (#51446) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/51446 See title Changelog: [Internal] Reviewed By: rshest Differential Revision: D74958927 fbshipit-source-id: 245397c6e9a89a40e5c1260fcd624e5f6b9f7c8d --- packages/react-native-fantom/runner/getFantomTestConfig.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/react-native-fantom/runner/getFantomTestConfig.js b/packages/react-native-fantom/runner/getFantomTestConfig.js index 82bd5878f37..e020d42e61b 100644 --- a/packages/react-native-fantom/runner/getFantomTestConfig.js +++ b/packages/react-native-fantom/runner/getFantomTestConfig.js @@ -56,6 +56,9 @@ const FANTOM_BENCHMARK_FILENAME_RE = /[Bb]enchmark-itest\./g; const FANTOM_BENCHMARK_SUITE_RE = /\n(Fantom\.)?unstable_benchmark(\s*)\.suite\(/g; +const FANTOM_BENCHMARK_DEFAULT_MODE: FantomTestConfigMode = + FantomTestConfigMode.Optimized; + /** * Extracts the Fantom configuration from the test file, specified as part of * the docblock comment. E.g.: @@ -123,7 +126,7 @@ export default function getFantomTestConfig( FANTOM_BENCHMARK_FILENAME_RE.test(testPath) || FANTOM_BENCHMARK_SUITE_RE.test(testContents) ) { - config.mode = FantomTestConfigMode.Optimized; + config.mode = FANTOM_BENCHMARK_DEFAULT_MODE; } }