23 lines
443 B
Python
23 lines
443 B
Python
import pytest
|
|
|
|
from llm_chat.utils import kebab_case
|
|
|
|
|
|
@pytest.mark.parametrize(
|
|
"string,expected",
|
|
[
|
|
("fooBar", "foo-bar"),
|
|
("FooBar", "foo-bar"),
|
|
("Foo Bar", "foo-bar"),
|
|
("1Foo2Bar3", "1-foo2-bar3"),
|
|
],
|
|
ids=[
|
|
"fooBar",
|
|
"FooBar",
|
|
"Foo Bar",
|
|
"1Foo2Bar3",
|
|
],
|
|
)
|
|
def test_kebab_case(string: str, expected: str) -> None:
|
|
assert kebab_case(string) == expected
|