test_svelte_text_splitter() — langchain Function Reference
Architecture documentation for the test_svelte_text_splitter() function in test_text_splitters.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 45501eaa_4471_3a66_0159_052b344e3858["test_svelte_text_splitter()"] 6d6b8ad4_1cfe_fbb0_e58e_76a50487c135["test_text_splitters.py"] 45501eaa_4471_3a66_0159_052b344e3858 -->|defined in| 6d6b8ad4_1cfe_fbb0_e58e_76a50487c135 style 45501eaa_4471_3a66_0159_052b344e3858 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/text-splitters/tests/unit_tests/test_text_splitters.py lines 612–624
def test_svelte_text_splitter() -> None:
splitter = JSFrameworkTextSplitter(chunk_size=30, chunk_overlap=0)
splits = splitter.split_text(FAKE_SVELTE_TEXT)
expected_splits = [
"<script>\n let count = 0",
"\n\n function increment() {\n count += 1\n }\n</script>",
"<main>",
"<h1>Counter App</h1>",
"<button on:click={increment}>\n Count is: {count}\n </button>\n</main>",
"<style>\n button {\n color: blue;\n }\n</style>",
]
assert [s.strip() for s in splits] == [s.strip() for s in expected_splits]
Domain
Subdomains
Source
Frequently Asked Questions
What does test_svelte_text_splitter() do?
test_svelte_text_splitter() is a function in the langchain codebase, defined in libs/text-splitters/tests/unit_tests/test_text_splitters.py.
Where is test_svelte_text_splitter() defined?
test_svelte_text_splitter() is defined in libs/text-splitters/tests/unit_tests/test_text_splitters.py at line 612.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free