Intermittent test results with trivial yjs example from the README.md

Hello!

I’m just getting started with yjs and running into issues trying to write a Jasmin test with yjs code inspired in the README.md:

const doc = new Y.Doc()
const data = doc.getMap("data")
data.set("generator", "")
data.set("generator", "something")
expect(data.get("generator")).toBe("something")

const update = Y.encodeStateAsUpdate(doc)

const doc2 = new Y.Doc()
Y.applyUpdate(doc2, update)

const data2 = doc2.getMap("data")
expect(data2.get("generator")).toBe("something")

The second expect call fails intermittently saying that the data2.get("generator") returns undefined instead of returning "something".

Any ideas?

Huh, it just started working. I must have had some kind of bad cached test or something. :man_shrugging: