diff --git a/tests/test_non_host.py b/tests/test_non_host.py
index 2849375..ed7b7b3 100644
--- a/tests/test_non_host.py
+++ b/tests/test_non_host.py
@@ -1,5 +1,6 @@
 from __future__ import annotations

+import json
 import sys
 from platform import python_implementation
 from typing import TYPE_CHECKING
@@ -31,10 +32,10 @@ def test_custom_interpreter(
     result = virtualenv.cli_run([str(tmp_path / "venv"), "--activators", ""])
     py = str(result.creator.exe.relative_to(tmp_path))
     cmd = ["", f"--python={result.creator.exe}"] if args_joined else ["", "--python", py]
-    mocker.patch("pipdeptree._discovery.sys.argv", cmd)
+    mocker.patch("pipdeptree._discovery.sys.argv", [*cmd, "-j"])
     main()
     out, _ = capfd.readouterr()
-    found = {i.split("==")[0] for i in out.splitlines()}
+    found = {i["package"]["package_name"] for i in json.loads(out)}
     implementation = python_implementation()
     if implementation == "CPython":
         expected = {"pip", "setuptools", "wheel"}
