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