Skip to content

Commit e08ace6

Browse files
accept tests root path in package.json config
1 parent a2963cb commit e08ace6

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

codeflash/code_utils/config_js.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,9 @@ def parse_package_json_config(package_json_path: Path) -> tuple[dict[str, Any],
251251
detected_module_root = detect_module_root(project_root, package_data)
252252
config["module_root"] = str((project_root / Path(detected_module_root)).resolve())
253253

254+
if codeflash_config.get("testsRoot"):
255+
config["tests_root"] = str(project_root / Path(codeflash_config["testsRoot"]).resolve())
256+
254257
# Auto-detect test runner
255258
config["test_runner"] = detect_test_runner(project_root, package_data)
256259
# Keep pytest_cmd for backwards compatibility with existing code

0 commit comments

Comments
 (0)