Open Darker opened 1 week ago
This could be the tip of a medium sized iceberg, since bigint isn't the only kind of value that isn't JSON serializable.
https://github.com/GoogleChromeLabs/jsbi/issues/30#issuecomment-521449285 is relevant.
I wouldn't expect Node to take care of this kind of thing. They theoretically could, since they control both ends of the pipe, but it's much simpler to just say that cluster communication uses JSON. So it's probably up to Jasmine to make this work. We could JSON-serialize our own messages and convert bigints to something like {"__jasmine_special_type": "BigInt", "value": "<string representation of the bigint>"}
and then reverse the conversion on the other side.
On the other hand, serialization and deserialization in JS is inherently lossy. bigint is one of the easy cases. There are plenty of objects that can't be serialized and deserialized without losing information. It might be better to set the expectation that the expected and actual properties of Expectation are a best-effort approximation in parallel mode, and just convert bigints to strings.
Steps to Reproduce
--parallel
Expected Behavior
Actual Behavior
Example code that reproduces the problem
Run with:
Using a config like this: