better logging
This commit is contained in:
parent
0dd646775e
commit
32a3950d16
|
@ -1,4 +1,5 @@
|
|||
name:
|
||||
builtins.trace "testing ${name}"
|
||||
map ({
|
||||
msg,
|
||||
success,
|
||||
|
|
17
tix/it.nix
17
tix/it.nix
|
@ -24,22 +24,11 @@ msg: {
|
|||
then builtins.removeAttrs v ["__toString" "__functor"]
|
||||
else v;
|
||||
|
||||
out =
|
||||
if safeToPrint
|
||||
then
|
||||
builtins.toJSON (undunder (
|
||||
if throws
|
||||
then (builtins.tryEval actual).value
|
||||
else {
|
||||
inherit actual expected;
|
||||
}
|
||||
))
|
||||
else ''{"msg": "cannot be stringified ):"}'';
|
||||
|
||||
success =
|
||||
if throws
|
||||
builtins.trace "testing if it ${msg}"
|
||||
( if throws
|
||||
then (builtins.tryEval actual).success == false
|
||||
else (a == e);
|
||||
else (a == e) );
|
||||
in
|
||||
{
|
||||
inherit success msg;
|
||||
|
|
Loading…
Reference in a new issue