Closed pgte closed 5 years ago
I suggest
Add a module to js-delta-crdts that exports
getReplica(type, id)
type
: Type of CRDT (eg 'RGA')id
: eg 'my rga'
Defaults to CRDT(type)(id)
implementReplica(fn)
fn
: a function that implements getReplica()
modify the tests to use getReplica()
and await a synchronization function before checking replace.value()
Add a script to peer-star-app that
implementReplica()
with a function that returns a Shared
Ah great this PR looks like it takes care of the issue in a simpler way, I think we can close this issue right?
I went with a different approach on this. Instead of entering the tests in peer-star-app, I made a custom serialization package (delta-crdts-msgpack-codec) and use it to test the transmission on deltas. (Also managed to catch a few bugs on a new feature with this).
This landed on v0.4.0.
Mentioned by @dirkmc, this problem was triggered by msgpack encode / decode properties.
There should be a way of performing the tests with differences introduced by serialisation / deserialization factored in.