Skip to content

Commit 937cd7b

Browse files
sammy-SCfacebook-github-bot
authored andcommitted
Exclude benchmark tests by default, add --benchmarks flag (facebook#55725)
Summary: changelog: [internal] By default, `yarn fantom` now excludes benchmark tests (`*-benchmark-itest.js` files) to speed up regular test runs. Benchmark tests are typically slower and used for performance analysis rather than correctness testing. Excluding them by default improves the developer experience for everyday test runs. To run benchmark tests, use the new `--benchmarks` flag: ``` yarn fantom --benchmarks ``` Reviewed By: andrewdacenko Differential Revision: D92150163
1 parent 00184ac commit 937cd7b

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

scripts/fantom.sh

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,20 @@ fi
1616

1717
export NODE_OPTIONS='--max-old-space-size=8192'
1818

19-
yarn jest --config private/react-native-fantom/config/jest.config.js "$@"
19+
# Parse arguments to check for --benchmarks flag
20+
INCLUDE_BENCHMARKS=false
21+
ARGS=()
22+
for arg in "$@"; do
23+
if [[ "$arg" == "--benchmarks" ]]; then
24+
INCLUDE_BENCHMARKS=true
25+
else
26+
ARGS+=("$arg")
27+
fi
28+
done
29+
30+
# By default, exclude benchmark tests unless --benchmarks is passed
31+
if [[ "$INCLUDE_BENCHMARKS" == false ]]; then
32+
ARGS+=("--testPathIgnorePatterns" "benchmark-itest")
33+
fi
34+
35+
yarn jest --config private/react-native-fantom/config/jest.config.js "${ARGS[@]}"

0 commit comments

Comments
 (0)