Skip to content

Commit

Permalink
test: demonstrate alias conversion (#399)
Browse files Browse the repository at this point in the history
fix in strcase dependency
properly converts screaming snakecase to camelcase

`MY_FLAG` -> `myFlag`
  • Loading branch information
jazanne authored Oct 16, 2023
1 parent 530ed76 commit b11a9d7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions aliases/alias_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,14 @@ func Test_GenerateAliases(t *testing.T) {
},
want: map[string][]string{"some_flag": slice("SomeFlag")},
},
{
name: "screaming snake case to camel case",
flags: slice("SOME_FLAG"),
aliases: []o.Alias{
alias(o.CamelCase),
},
want: map[string][]string{"SOME_FLAG": slice("someFlag")},
},
{
name: "file exact pattern",
flags: slice(testFlagKey),
Expand Down

0 comments on commit b11a9d7

Please sign in to comment.