2023-12-31 21:33:42 +00:00
|
|
|
msg:
|
|
|
|
{ actual, expected, asString ? false, asJSON ? false, }:
|
|
|
|
if (if asString then
|
|
|
|
toString actual == toString expected
|
|
|
|
else if asJSON then
|
|
|
|
builtins.toJSON actual == builtins.toJSON expected
|
|
|
|
else
|
|
|
|
actual == expected) then ''
|
|
|
|
echo 'it ${msg}'
|
|
|
|
'' else ''
|
|
|
|
echo 'FAILED: ${msg}'
|
|
|
|
echo '${builtins.toJSON expected}'
|
|
|
|
echo '${builtins.toJSON actual}'
|
|
|
|
''
|