mirror of
https://github.com/littensy/charm.git
synced 2026-10-21 03:36:11 +00:00
refactor: refine types and code
This commit is contained in:
parent
33ecae2f50
commit
382bc3a904
6 changed files with 30 additions and 26 deletions
|
|
@ -7,7 +7,7 @@ return function()
|
|||
local client = sync.client({ atoms = { a = a } })
|
||||
|
||||
client:sync({
|
||||
type = "set",
|
||||
type = "init",
|
||||
data = { a = 2 },
|
||||
})
|
||||
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue