mirror of
https://github.com/PR0M3TH3AN/VoxVera.git
synced 2025-09-08 23:18:42 +00:00
Add dependency check subcommand
This commit is contained in:
@@ -64,3 +64,20 @@ def test_import(tmp_path, monkeypatch):
|
||||
assert dest.is_dir()
|
||||
assert (dest / "index.html").exists()
|
||||
|
||||
|
||||
def test_check_all_present(capsys, monkeypatch):
|
||||
monkeypatch.setattr(shutil, "which", lambda cmd: "/usr/bin/" + cmd)
|
||||
cli.main(["check"])
|
||||
captured = capsys.readouterr()
|
||||
assert "All required tools are installed." in captured.out
|
||||
|
||||
|
||||
def test_check_missing(capsys, monkeypatch):
|
||||
def fake_which(cmd):
|
||||
return None if cmd == "node" else "/usr/bin/" + cmd
|
||||
|
||||
monkeypatch.setattr(shutil, "which", fake_which)
|
||||
cli.main(["check"])
|
||||
captured = capsys.readouterr()
|
||||
assert "node: missing" in captured.out
|
||||
|
||||
|
Reference in New Issue
Block a user