Skip to content

Commit 5206cac

Browse files
committed
fix(tests): update claude version_command test for new detection method
1 parent 7401c3d commit 5206cac

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

tests/test_catalog_and_collectors.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,17 @@ def test_claude_catalog_has_version_command(self):
3434
assert data["version_command"], "version_command should not be empty"
3535

3636
def test_claude_catalog_version_command_format(self):
37-
"""Test that claude.json version_command checks package.json."""
37+
"""Test that claude.json version_command runs claude --version."""
3838
catalog_path = PROJECT_ROOT / "catalog" / "claude.json"
3939

4040
with open(catalog_path) as f:
4141
data = json.load(f)
4242

4343
version_cmd = data.get("version_command", "")
44-
# Should reference package.json to get version, not run claude binary
45-
assert "package.json" in version_cmd, "version_command should check package.json"
46-
assert "version" in version_cmd.lower(), "version_command should extract version"
44+
# Should run claude --version directly for accurate detection
45+
# (package.json was unreliable - returned stale/incorrect versions)
46+
assert "claude" in version_cmd, "version_command should run claude binary"
47+
assert "--version" in version_cmd, "version_command should use --version flag"
4748

4849
def test_claude_catalog_structure(self):
4950
"""Test that claude.json has valid catalog structure."""

0 commit comments

Comments
 (0)