Rely: pretty printing boolean values
Right now when doing:
expect.equal(
{userId: 1, id: 3, title: "fugiat veniam minus", completed: false},
{userId: 1, id: 3, title: "fugiat veniam minus", completed: true},
);
we receive such error:
expect.equal(expected, received) /* using == */
Expected value to equal:
{1, 3, "fugiat veniam minus", 0}
Received:
{1, 3, "fugiat veniam minus", 1}
It would be nice to print boolean values as true or false which is easier to spot and distinguish from int.
@jordwalke is this something we can fix in Console? Or are we unable to distinguish booleans there?
@kyldvs It seems there is no such thing as Obj.bool_tag or something similar. I hope I'm wrong.
I also believe that we can't distinguish bools from int in our polymorphic printer unfortunately (which is in fact looking at object tags).
What if we were to always print both options? 0 (false) or 1 (true) when printing ints with those values?
@kyldvs I think bools, polymorphic variants, and ordinary variants are all expressed as ints.