fix: pretty print expected aswell when format is "pretty"

This commit is contained in:
technofab 2025-05-11 02:05:01 +02:00
parent 4aaaf32621
commit 9068477650
2 changed files with 13 additions and 1 deletions

View file

@ -19,9 +19,14 @@
if format == "json"
then actual
else lib.generators.toPretty {} actual;
expected' =
if format == "json"
then expected
else lib.generators.toPretty {} expected;
in {
inherit type name description expected;
inherit type name description;
actual = actual';
expected = expected';
# discard string context, otherwise it's being built instantly which we don't want
actualDrv = builtins.unsafeDiscardStringContext (actualDrv.drvPath or "");
pos =