summaryrefslogtreecommitdiff
path: root/internal/hexaiaction/prompts_simplify_test.go
blob: 4daba3835179bf107e4de17e4067a50819691470 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package hexaiaction

import (
	"context"
	"testing"

	"codeberg.org/snonux/hexai/internal/appconfig"
	"codeberg.org/snonux/hexai/internal/llm"
)

type simplifyClient struct{}

func (simplifyClient) Chat(_ context.Context, _ []llm.Message, _ ...llm.RequestOption) (string, error) {
	return "OUT", nil
}
func (simplifyClient) DefaultModel() string { return "m" }

func TestRunSimplify_Smoke(t *testing.T) {
	cfg := appconfig.Load(nil)
	out, err := runSimplify(context.Background(), cfg, simplifyClient{}, "code")
	if err != nil {
		t.Fatalf("runSimplify: %v", err)
	}
	if out == "" {
		t.Fatalf("expected output")
	}
}