mirror of
https://github.com/littensy/charm.git
synced 2026-10-23 05:46:27 +00:00
feat: add optional convertArrays
This commit is contained in:
parent
e4019c049c
commit
13e06dd44c
9 changed files with 72 additions and 60 deletions
|
|
@ -52,12 +52,13 @@ return function()
|
|||
expect(applied["4"]).to.never.be.ok()
|
||||
end)
|
||||
|
||||
it("preserves array density after serdes", function()
|
||||
itFOCUS("preserves array density after serdes", function()
|
||||
-- This particular change results in a patch that cannot be serialized
|
||||
-- without losing information. Charm resolves this issue internally.
|
||||
local prevState = { "a", "b", "c", "d", "e" }
|
||||
local nextState = { "A", "b", "c", "D" }
|
||||
|
||||
-- FIXME: The [0] index used to fix serialization issues is not preserved
|
||||
local patches = serdes(patch.diff(prevState, nextState))
|
||||
local applied = patch.apply(prevState, patches)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue