mirror of
https://github.com/littensy/charm.git
synced 2026-10-21 03:36:11 +00:00
fix: add unmount behavior to split atoms
This commit is contained in:
parent
4586882d3c
commit
fc3cd6d9ad
4 changed files with 25 additions and 16 deletions
|
|
@ -125,4 +125,12 @@ return function()
|
|||
expect(updated).to.equal(1)
|
||||
expect(deleted).to.equal(3)
|
||||
end)
|
||||
|
||||
it("unmounts from parent atom", function()
|
||||
local itemsAtom = atom({})
|
||||
local itemAtoms = split(itemsAtom)
|
||||
expect((next(itemsAtom.listeners))).to.be.ok()
|
||||
itemAtoms:unmount()
|
||||
expect((next(itemsAtom.listeners))).to.never.be.ok()
|
||||
end)
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue