Files
Memoh/cmd/feishu-echo/main_test.go
T
BBQ ca5c6a1866 refactor(core): restructure conversation, channel and message domains
- Rename chat module to conversation with flow-based architecture
- Move channelidentities into channel/identities subpackage
- Add channel/route for routing logic
- Add message service with event hub
- Add MCP providers: container, directory, schedule
- Refactor Feishu/Telegram adapters with directory and stream support
- Add platform management page and channel badges in web UI
- Update database schema for conversations, messages and channel routes
- Add @memoh/shared package for cross-package type definitions
2026-02-12 15:34:40 +08:00

21 lines
466 B
Go

package main
import (
"testing"
)
func TestEventCounts(t *testing.T) {
c := new(eventCounts)
c.log()
if c.messageReceive.Load() != 0 || c.messageRead.Load() != 0 {
t.Fatalf("initial counts should be 0")
}
c.messageReceive.Add(2)
c.messageRead.Add(1)
c.reactionCreated.Add(1)
if c.messageReceive.Load() != 2 || c.messageRead.Load() != 1 || c.reactionCreated.Load() != 1 {
t.Fatalf("counts after add: receive=2 read=1 reaction_created=1")
}
c.log()
}