(t *testing.T)
| 87 | } |
| 88 | |
| 89 | func TestToKebabCase(t *testing.T) { |
| 90 | tests := []struct { |
| 91 | name string |
| 92 | input string |
| 93 | expected string |
| 94 | }{ |
| 95 | { |
| 96 | name: "full lowercase", |
| 97 | input: "iaminlowercase", |
| 98 | expected: "iaminlowercase", |
| 99 | }, |
| 100 | { |
| 101 | name: "full uppercase", |
| 102 | input: "IAMINUPPERCASE", |
| 103 | expected: "iaminuppercase", |
| 104 | }, |
| 105 | { |
| 106 | name: "camelCase", |
| 107 | input: "camelCase", |
| 108 | expected: "camel-case", |
| 109 | }, |
| 110 | { |
| 111 | name: "PascalCase", |
| 112 | input: "PascalCase", |
| 113 | expected: "pascal-case", |
| 114 | }, |
| 115 | } |
| 116 | |
| 117 | for _, tt := range tests { |
| 118 | t.Run(tt.name, func(t *testing.T) { |
| 119 | assert.Equal(t, tt.expected, ToKebabCase(tt.input)) |
| 120 | }) |
| 121 | } |
| 122 | } |
| 123 | |
| 124 | func TestStringToSlice(t *testing.T) { |
| 125 | tests := []struct { |
nothing calls this directly
no test coverage detected