mirror of
https://github.com/littensy/charm.git
synced 2026-10-21 11:44:08 +00:00
feat: add signal api
This commit is contained in:
parent
bf92413a97
commit
1e0b10aef6
21 changed files with 300 additions and 293 deletions
|
|
@ -24,7 +24,7 @@ local function mockArraySerdes(object: { [any]: any }): { [any]: any }
|
|||
end
|
||||
|
||||
afterEach(function()
|
||||
config.autoSerialize = true
|
||||
config.fixArrays = true
|
||||
config.validatePatches = true
|
||||
end)
|
||||
|
||||
|
|
@ -104,13 +104,13 @@ test("cannot preserve sparse arrays", function()
|
|||
end)
|
||||
|
||||
test("optionally fixes sparse arrays", function()
|
||||
config.autoSerialize = true
|
||||
config.fixArrays = true
|
||||
|
||||
for index in next, patch.diff({ 1, 1, 1, 1, 1 }, { 2, 1, 1, 2 }) do
|
||||
assert(type(index) == "string", `expected {type(index)} {index} to be string`)
|
||||
end
|
||||
|
||||
config.autoSerialize = false
|
||||
config.fixArrays = false
|
||||
|
||||
for index in next, patch.diff({ 1, 1, 1, 1, 1 }, { 2, 1, 1, 2 }) do
|
||||
assert(type(index) == "number", `expected {type(index)} {index} to be number`)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue