]> git.giacomolli.uk - onechat/blobdiff - voice_transcriber_test.go
Keep scenario tests with their implementation
[onechat] / voice_transcriber_test.go
index 48732f7a76691c468450223d089a87f98f728b3d..c9e24bc5903c51fdd12fbcb670917952da010fe8 100644 (file)
@@ -57,9 +57,18 @@ func TestVoiceFailuresKeepStoredAudioAndSafeMarkers(t *testing.T) {
                name   string
                script string
        }{
-               {name: "failed process does not expose its errors", script: "echo secret-speech >&2; exit 1"},
-               {name: "missing transcript gets a marker", script: "exit 0"},
-               {name: "empty transcript gets a marker", script: "while [ \"$1\" != --output-file ]; do shift; done; shift; touch \"$1.txt\""},
+               {
+                       name:   "failed process does not expose its errors",
+                       script: "echo secret-speech >&2; exit 1",
+               },
+               {
+                       name:   "missing transcript gets a marker",
+                       script: "exit 0",
+               },
+               {
+                       name:   "empty transcript gets a marker",
+                       script: "while [ \"$1\" != --output-file ]; do shift; done; shift; touch \"$1.txt\"",
+               },
        }
        for _, tc := range testCases {
                t.Run(tc.name, func(t *testing.T) {
@@ -144,7 +153,10 @@ func TestVoiceConfigReadsExplicitLocalPaths(t *testing.T) {
 
        config, err := loadConfig(dir)
        require.NoError(t, err)
-       require.Equal(t, VoiceConfig{Transcriber: "local-whisper", Model: "model.bin"}, config.Voice)
+       require.Equal(t, VoiceConfig{
+               Transcriber: "local-whisper",
+               Model:       "model.bin",
+       }, config.Voice)
 }
 
 func TestVoiceLookupHonorsExplicitThenNixThenPath(t *testing.T) {
@@ -178,8 +190,11 @@ func TestVoiceLookupHonorsExplicitThenNixThenPath(t *testing.T) {
                        available: true,
                },
                {
-                       name:    "invalid explicit executable does not fall back",
-                       config:  VoiceConfig{Transcriber: "missing", Model: valid.Model},
+                       name: "invalid explicit executable does not fall back",
+                       config: VoiceConfig{
+                               Transcriber: "missing",
+                               Model:       valid.Model,
+                       },
                        program: valid.Transcriber,
                },
                {