MCPcopy Create free account
hub / github.com/diillson/chatcli / TestAnimationManagerUpdateMessage

Function TestAnimationManagerUpdateMessage

cli/terminal_ansi_test.go:92–109  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

90}
91
92func TestAnimationManagerUpdateMessage(t *testing.T) {
93 am := NewAnimationManager()
94 am.ShowThinkingAnimation("Mensagem Inicial")
95 time.Sleep(100 * time.Millisecond)
96
97 am.UpdateMessage("Mensagem Atualizada")
98 time.Sleep(100 * time.Millisecond)
99
100 am.mu.Lock()
101 currentMsg := am.currentMessage
102 am.mu.Unlock()
103
104 if currentMsg != "Mensagem Atualizada" {
105 t.Errorf("Expected current message to be 'Mensagem Atualizada', got '%s'", currentMsg)
106 }
107
108 am.StopThinkingAnimation()
109}
110
111func TestTypewriterEffectSyncsOutput(t *testing.T) {
112 logger, _ := zap.NewDevelopment()

Callers

nothing calls this directly

Calls 7

ShowThinkingAnimationMethod · 0.95
UpdateMessageMethod · 0.95
StopThinkingAnimationMethod · 0.95
NewAnimationManagerFunction · 0.85
LockMethod · 0.80
UnlockMethod · 0.80
ErrorfMethod · 0.80

Tested by

no test coverage detected