justusbot/internal/datastore/chats_test.go

26 lines
393 B
Go
Raw Normal View History

2026-10-06 23:38:36 -06:00
package datastore
import (
"fmt"
"testing"
"go.destrealm.net/vfs"
)
func Test_LoadChats(t *testing.T) {
fs, _ := vfs.NewVFS("../../data/chats")
c, err := LoadChats(fs)
if err != nil {
t.Error(err)
}
fmt.Println("chats:", c)
fmt.Println(c.ChatIDMap)
fmt.Println(c.root)
for k, _ := range c.ChatIDMap {
ch, ok := c.LoadChannelByID(k)
fmt.Println(ch, ok)
}
t.Error(".")
}