build: update dev config

This commit is contained in:
Richard 2024-09-25 22:10:04 -07:00
parent 4b6739c776
commit 8aef95e2ae
3 changed files with 27 additions and 6 deletions

View file

@ -4,12 +4,11 @@
"$className": "DataModel",
"ReplicatedStorage": {
"$className": "ReplicatedStorage",
"Packages": {
"$path": "Packages",
"ReactLua": { "$path": "Packages" },
"charm": { "$path": "src" }
"DevPackages": {
"$path": "DevPackages",
"Charm": { "$path": "src" }
},
"DevPackages": { "$path": "DevPackages" }
"Packages": { "$path": "Packages" }
},
"TestService": {
"$className": "TestService",

View file

@ -20,6 +20,13 @@ return function()
local previous = a()
local client = sync.client({ atoms = { a = a } })
client:sync({
type = "init",
data = { a = a() },
})
expect(a()).to.equal(previous)
client:sync({
type = "patch",
data = { a = { b = 3 } },
@ -34,6 +41,11 @@ return function()
local a = atom({ 1 })
local client = sync.client({ atoms = { a = a } })
client:sync({
type = "init",
data = { a = a() },
})
-- This patch would be the result of a diff between { 1 } and { 1, 2 } that
-- was JSON-serialized and deserialized. The client should be able to catch
-- this and convert the string key back to a number.
@ -55,6 +67,11 @@ return function()
table.insert(calls, value)
end)
client:sync({
type = "init",
data = { a = a() },
})
client:sync({
type = "patch",
data = { a = 2 },
@ -82,6 +99,11 @@ return function()
states.a = a()
end)
client:sync({
type = "init",
data = { a = a(), b = b() },
})
client:sync({
type = "patch",
data = { a = 1, b = 2 },

View file

@ -1 +1 @@
roots = ["ReplicatedStorage/Packages/charm/__tests__"]
roots = ["ReplicatedStorage/DevPackages/Charm/__tests__"]