Skip to content

Commit 6980d4e

Browse files
committed
Merge remote-tracking branch 'origin/multi-language' into multi-language
2 parents 0765f2a + 0c7c40a commit 6980d4e

3 files changed

Lines changed: 8 additions & 7 deletions

File tree

tests/scripts/end_to_end_test_js_cjs_function.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def run_test() -> bool:
1515
function_name="fibonacci",
1616
min_improvement_x=0.5, # Expect at least 50% improvement
1717
expected_improvement_pct=50,
18-
expected_test_files=1,
18+
expected_test_files=1, # At least one test file should be instrumented
1919
)
2020

2121
cwd = (

tests/scripts/end_to_end_test_js_esm_async.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ def run_test() -> bool:
1414
config = JSTestConfig(
1515
file_path=pathlib.Path("async_utils.js"),
1616
function_name="processItemsSequential",
17-
min_improvement_x=0.1, # Async optimizations may have variable gains
18-
expected_improvement_pct=10,
17+
min_improvement_x=0.05, # Async optimizations may have variable gains
18+
expected_improvement_pct=5,
1919
expected_test_files=1,
2020
)
2121

tests/scripts/end_to_end_test_utilities_js.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,15 +116,16 @@ def validate_js_output(
116116
return False
117117

118118
if config.expected_test_files is not None:
119-
test_files_match = re.search(r"Discovered (\d+) existing unit test files?", stdout)
119+
# Look for "Instrumented X existing unit test files" (the actual file count)
120+
test_files_match = re.search(r"Instrumented (\d+) existing unit test files?", stdout)
120121
if not test_files_match:
121-
logging.error("Could not find unit test file count")
122+
logging.error("Could not find unit test file count in output")
122123
return False
123124

124125
num_test_files = int(test_files_match.group(1))
125-
if num_test_files != config.expected_test_files:
126+
if num_test_files < config.expected_test_files:
126127
logging.error(
127-
f"Expected {config.expected_test_files} test files, found {num_test_files}"
128+
f"Expected at least {config.expected_test_files} test files, found {num_test_files}"
128129
)
129130
return False
130131

0 commit comments

Comments
 (0)