Skip to content

Commit fdc81ac

Browse files
committed
test(scripts): minimize feature metadata regression coverage
1 parent 8009c0d commit fdc81ac

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

tests/test_timestamp_branches.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ def test_json_output_keys(self, git_repo: Path):
181181
assert re.match(r"^\d{8}-\d{6}$", data["FEATURE_NUM"])
182182

183183
def test_writes_feature_metadata_file(self, git_repo: Path):
184-
"""The create script persists .specify/feature.json for downstream commands."""
184+
"""Feature creation persists .specify/feature.json with the created spec dir."""
185185
import json
186186

187187
result = run_script(git_repo, "--json", "--short-name", "meta-test", "Metadata test")
@@ -657,6 +657,12 @@ def test_powershell_supports_allow_existing_branch_flag(self):
657657
# Ensure the flag is referenced in script logic, not just declared
658658
assert "AllowExistingBranch" in contents.replace("-AllowExistingBranch", "")
659659

660+
def test_powershell_persists_feature_metadata(self):
661+
"""Static guard: PS script writes .specify/feature.json."""
662+
contents = CREATE_FEATURE_PS.read_text(encoding="utf-8")
663+
assert "feature_directory = \"specs/$branchName\"" in contents
664+
assert "feature.json" in contents
665+
660666
def test_powershell_surfaces_checkout_errors(self):
661667
"""Static guard: PS script preserves checkout stderr on existing-branch failures."""
662668
contents = CREATE_FEATURE_PS.read_text(encoding="utf-8")

0 commit comments

Comments
 (0)