diff --git a/pkgs/lib/debug.nix b/pkgs/lib/debug.nix index 25ca733951a3..d4d2702a2843 100644 --- a/pkgs/lib/debug.nix +++ b/pkgs/lib/debug.nix @@ -71,7 +71,9 @@ rec { then [ { inherit name; expected = test.expected; result = test.expr; } ] else [] ) tests)); - + # create a test assuming that list elements are true + # usage: { testX = allTrue [ true ]; } + testAllTrue = expr : { inherit expr; expected = map (x: true) expr; }; # evaluate everything once so that errors will occur earlier # hacky: traverse attrs by adding a dummy