feat: miro test command

This commit is contained in:
2026-03-19 20:15:11 +00:00
parent 5ebca22225
commit e5b767e35f
12 changed files with 942 additions and 16 deletions
+3 -3
View File
@@ -44,7 +44,7 @@ func TestInitUsesGitRoot(t *testing.T) {
assertRecordShell(t, filepath.Join(root, "e2e", recordShellName))
}
func TestInitLeavesExistingValidConfigUntouched(t *testing.T) {
func TestInitLeavesExistingValidConfigUntouchedAndRefreshesShell(t *testing.T) {
root := t.TempDir()
writeFile(t, filepath.Join(root, "miro.toml"), validConfigContent("custom/suite"))
writeFile(t, filepath.Join(root, "custom", "suite", recordShellName), "outdated\n")
@@ -60,8 +60,8 @@ func TestInitLeavesExistingValidConfigUntouched(t *testing.T) {
if got != validConfigContent("custom/suite") {
t.Fatalf("config = %q, want %q", got, validConfigContent("custom/suite"))
}
if got := readFile(t, filepath.Join(root, "custom", "suite", recordShellName)); got != "outdated\n" {
t.Fatalf("shell = %q, want existing shell to stay untouched", got)
if got := readFile(t, filepath.Join(root, "custom", "suite", recordShellName)); got != buildRecordShellScript() {
t.Fatalf("shell = %q, want refreshed recorder shell", got)
}
}