I'm having some issues with JavaScript random tests that appear to have BigInt inputs and expect BigInt results because returning a Number yields:
lastDigit(5143600, 0: expected 1 to equal {}
If I convert the results to BigInt when the inputs are BigInt, this error is thrown:
TypeError: Do not know how to serialize a BigInt at JSON.stringify
Thanks DrIvanKO! That did the trick for me.
I'm having some issues with JavaScript random tests that appear to have BigInt inputs and expect BigInt results because returning a Number yields:
lastDigit(5143600, 0: expected 1 to equal {}
If I convert the results to BigInt when the inputs are BigInt, this error is thrown:
TypeError: Do not know how to serialize a BigInt at JSON.stringify
Seems to be related to this issue with JSON.stringify and BigInt https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/BigInt_not_serializable, so maybe a test issue rather than a problem with my solution?