refactor: refine types and code

This commit is contained in:
Richard 2024-03-27 23:49:33 -07:00
parent 33ecae2f50
commit 382bc3a904
6 changed files with 30 additions and 26 deletions

View file

@ -7,7 +7,7 @@ return function()
local client = sync.client({ atoms = { a = a } })
client:sync({
type = "set",
type = "init",
data = { a = 2 },
})

View file

@ -17,7 +17,7 @@ return function()
server:hydrate(target)
expect(player).to.equal(target)
expect(payload.type).to.equal("set")
expect(payload.type).to.equal("init")
expect(payload.data.a).to.equal(1)
disconnect()