@@ -361,9 +361,14 @@ def test_edge_type_filter(self, tmp_path):
361361
362362
363363class TestGraphCLI :
364- def test_default_json_export (self , graph_git_project ):
364+ def test_default_mermaid_export (self , graph_git_project ):
365365 result = _run_graph_cli (["." , "-q" ], cwd = graph_git_project )
366366 assert result .returncode == 0
367+ assert result .stdout .startswith ("graph LR" )
368+
369+ def test_json_format (self , graph_git_project ):
370+ result = _run_graph_cli (["." , "-f" , "json" , "-q" ], cwd = graph_git_project )
371+ assert result .returncode == 0
367372 data = json .loads (result .stdout )
368373 assert data ["type" ] == "project_graph"
369374
@@ -401,7 +406,7 @@ def test_metrics(self, graph_git_project):
401406
402407 def test_output_file (self , graph_git_project ):
403408 out_file = graph_git_project / "graph.json"
404- result = _run_graph_cli (["." , "-o" , str (out_file ), "-q" ], cwd = graph_git_project )
409+ result = _run_graph_cli (["." , "-f" , "json" , "- o" , str (out_file ), "-q" ], cwd = graph_git_project )
405410 assert result .returncode == 0
406411 assert out_file .exists ()
407412 data = json .loads (out_file .read_text ())
0 commit comments