summaryrefslogtreecommitdiff
path: root/internal/lsp/completion_codex_path_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/lsp/completion_codex_path_test.go')
-rw-r--r--internal/lsp/completion_codex_path_test.go10
1 files changed, 8 insertions, 2 deletions
diff --git a/internal/lsp/completion_codex_path_test.go b/internal/lsp/completion_codex_path_test.go
index 6c0a60f..ea27c6e 100644
--- a/internal/lsp/completion_codex_path_test.go
+++ b/internal/lsp/completion_codex_path_test.go
@@ -39,7 +39,10 @@ func (f *fakeCodeLLM) Name() string { return "fake" }
func (f *fakeCodeLLM) DefaultModel() string { return "m" }
func TestTryLLMCompletion_PrefersCodeCompleterOverChat(t *testing.T) {
- s := &Server{maxTokens: 32, triggerChars: []string{"."}, compCache: make(map[string]string)}
+ s := newTestServer()
+ s.cfg.MaxTokens = 32
+ s.cfg.TriggerCharacters = []string{"."}
+ s.compCache = make(map[string]string)
initServerDefaults(s)
fake := &fakeCodeLLM{result: "DoThing()"}
s.llmClient = fake
@@ -58,7 +61,10 @@ func TestTryLLMCompletion_PrefersCodeCompleterOverChat(t *testing.T) {
}
func TestTryLLMCompletion_FallsBackToChatOnCodeCompleterError(t *testing.T) {
- s := &Server{maxTokens: 32, triggerChars: []string{"."}, compCache: make(map[string]string)}
+ s := newTestServer()
+ s.cfg.MaxTokens = 32
+ s.cfg.TriggerCharacters = []string{"."}
+ s.compCache = make(map[string]string)
initServerDefaults(s)
fake := &fakeCodeLLM{result: "DoThing()", codeErr: errors.New("boom")}
s.llmClient = fake