Add test for corner case when all chars are uppercase or lowercase
This commit is contained in:
@@ -17,3 +17,11 @@ test "fromSnakeCase":
|
|||||||
check "FIRST_NAME_ONLY".fromSnakeCase() == "firstNameOnly"
|
check "FIRST_NAME_ONLY".fromSnakeCase() == "firstNameOnly"
|
||||||
check "ROSTR_TOKEN".fromSnakeCase() == "rostrToken"
|
check "ROSTR_TOKEN".fromSnakeCase() == "rostrToken"
|
||||||
|
|
||||||
|
test "all lowercase":
|
||||||
|
check "thisisatest".toSnakeCase() == "THISISATEST"
|
||||||
|
check "thisisatest".fromSnakeCase() == "thisisatest"
|
||||||
|
|
||||||
|
test "all uppercase":
|
||||||
|
check "THISISATEST".toSnakeCase() == "THISISATEST"
|
||||||
|
check "THISISATEST".fromSnakeCase() == "thisisatest"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user