Complete resource inspection validation and coverage
This commit is contained in:
@@ -92,3 +92,15 @@ func TestTypedPromptSourceDefersValidation(t *testing.T) {
|
||||
t.Fatalf("invalid final source: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestNilTypedPromptSourceSuppliesEmptySequence(t *testing.T) {
|
||||
source := promptkit.PromptSource("empty", nil)
|
||||
engine, err := promptkit.NewEngine(promptkit.Config{Sources: promptkit.ConfigurationSources{Main: &configkit.Input{Source: source}}}, promptkit.WithBundledOpenRouter(false))
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
prompts, err := engine.ListPrompts(context.Background())
|
||||
if err != nil || len(prompts) != 0 {
|
||||
t.Fatalf("empty source = %v, %v", prompts, err)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user