MCPcopy Create free account
hub / github.com/driangle/taskmd / TestParseIDConfig_PartialConfig

Function TestParseIDConfig_PartialConfig

apps/cli/internal/cli/validate_test.go:778–800  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

776}
777
778func TestParseIDConfig_PartialConfig(t *testing.T) {
779 raw := map[string]any{
780 "strategy": "sequential",
781 }
782
783 cfg := parseIDConfig(raw)
784 if cfg == nil {
785 t.Fatal("expected non-nil IDConfig")
786 return
787 }
788 if cfg.Strategy != "sequential" {
789 t.Errorf("Strategy = %q, want %q", cfg.Strategy, "sequential")
790 }
791 if cfg.Prefix != "" {
792 t.Errorf("Prefix = %q, want empty", cfg.Prefix)
793 }
794 if cfg.Length != 0 {
795 t.Errorf("Length = %d, want 0", cfg.Length)
796 }
797 if cfg.Padding != 0 {
798 t.Errorf("Padding = %d, want 0", cfg.Padding)
799 }
800}
801
802func TestParseIDConfig_Nil(t *testing.T) {
803 cfg := parseIDConfig(nil)

Callers

nothing calls this directly

Calls 1

parseIDConfigFunction · 0.85

Tested by

no test coverage detected