mirror of
https://github.com/memohai/Memoh.git
synced 2026-04-27 07:16:19 +09:00
ca5c6a1866
- 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
21 lines
466 B
Go
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()
|
|
}
|