MCPcopy
hub / github.com/tirth8205/code-review-graph / test_parse_vue_js_default

Method test_parse_vue_js_default

tests/test_parser.py:459–474  ·  view source on GitHub ↗

Vue file without lang attr should parse script as JavaScript.

(self)

Source from the content-addressed store, hash-verified

457 assert nodes[0].kind == "File"
458
459 def test_parse_vue_js_default(self):
460 """Vue file without lang attr should parse script as JavaScript."""
461 source = (
462 b"<script>\n"
463 b"export default {\n"
464 b" methods: {\n"
465 b" greet() { return 'hi' }\n"
466 b" }\n"
467 b"}\n"
468 b"</script>\n"
469 )
470 path = Path("js_default.vue")
471 nodes, edges = self.parser.parse_bytes(path, source)
472 funcs = [n for n in nodes if n.kind == "Function"]
473 func_names = {f.name for f in funcs}
474 assert "greet" in func_names
475
476 # --- Dart tests ---
477

Callers

nothing calls this directly

Calls 1

parse_bytesMethod · 0.80

Tested by

no test coverage detected