Changeset 0.14.0 (#67)
This commit is contained in:
@@ -3,13 +3,23 @@ package tools
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"git.gobha.me/xcaliber/chat-switchboard/store"
|
||||
)
|
||||
|
||||
// TestMain registers late-registered tools (notes) with nil deps so
|
||||
// that Definition()-level tests work. Execute() tests need real deps.
|
||||
func TestMain(m *testing.M) {
|
||||
RegisterNoteTools(store.Stores{}, nil)
|
||||
os.Exit(m.Run())
|
||||
}
|
||||
|
||||
// ── Registry Tests ──────────────────────────
|
||||
|
||||
func TestRegistryHasTools(t *testing.T) {
|
||||
// init() in notes.go registers 4 tools
|
||||
// TestMain registers note tools via RegisterNoteTools
|
||||
if !HasTools() {
|
||||
t.Fatal("Expected HasTools() == true after init registration")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user