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

Method test_detect_shebang_node

tests/test_parser.py:64–68  ·  view source on GitHub ↗
(self, tmp_path)

Source from the content-addressed store, hash-verified

62 assert self.parser.detect_language(p) == "python"
63
64 def test_detect_shebang_node(self, tmp_path):
65 p = self._write_shebang_file(
66 tmp_path, "cli", "#!/usr/bin/env node\nconsole.log(1);\n",
67 )
68 assert self.parser.detect_language(p) == "javascript"
69
70 def test_detect_shebang_env_dash_s_flag(self, tmp_path):
71 """``#!/usr/bin/env -S node --flag`` (Linux -S) resolves to the interpreter."""

Callers

nothing calls this directly

Calls 2

_write_shebang_fileMethod · 0.95
detect_languageMethod · 0.80

Tested by

no test coverage detected