Home / Function/ test_vue_text_splitter() — langchain Function Reference

test_vue_text_splitter() — langchain Function Reference

Architecture documentation for the test_vue_text_splitter() function in test_text_splitters.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  cd8d0bbf_65b9_3260_1455_26055c967149["test_vue_text_splitter()"]
  6d6b8ad4_1cfe_fbb0_e58e_76a50487c135["test_text_splitters.py"]
  cd8d0bbf_65b9_3260_1455_26055c967149 -->|defined in| 6d6b8ad4_1cfe_fbb0_e58e_76a50487c135
  style cd8d0bbf_65b9_3260_1455_26055c967149 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/text-splitters/tests/unit_tests/test_text_splitters.py lines 564–585

def test_vue_text_splitter() -> None:
    splitter = JSFrameworkTextSplitter(chunk_size=30, chunk_overlap=0)
    splits = splitter.split_text(FAKE_VUE_TEXT)

    expected_splits = [
        "<template>",
        "<div>",
        "<h1>{{ title }}</h1>",
        (
            '<button @click="increment">\n      Count is: {{ count }}\n'
            "    </button>\n  </div>\n</template>"
        ),
        "<script>",
        "export",
        (
            " default {\n  data() {\n    return {\n      title: 'Counter App',\n      "
            "count: 0\n    }\n  },\n  methods: {\n    increment() {\n      "
            "this.count++\n    }\n  }\n}\n</script>"
        ),
        "<style>\nbutton {\n  color: blue;\n}\n</style>",
    ]
    assert [s.strip() for s in splits] == [s.strip() for s in expected_splits]

Domain

Subdomains

Frequently Asked Questions

What does test_vue_text_splitter() do?
test_vue_text_splitter() is a function in the langchain codebase, defined in libs/text-splitters/tests/unit_tests/test_text_splitters.py.
Where is test_vue_text_splitter() defined?
test_vue_text_splitter() is defined in libs/text-splitters/tests/unit_tests/test_text_splitters.py at line 564.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free