mirror of
https://github.com/littensy/charm.git
synced 2026-10-21 11:44:08 +00:00
feat: use alien-signals
This commit is contained in:
parent
d7a1f62c3c
commit
861ee5acd7
76 changed files with 3112 additions and 1862 deletions
|
|
@ -1,24 +0,0 @@
|
|||
local ReplicatedStorage = game:GetService("ReplicatedStorage")
|
||||
|
||||
local Charm = require(ReplicatedStorage.DevPackages.Charm)
|
||||
local atom = Charm.atom
|
||||
local CharmSync = require(ReplicatedStorage.DevPackages.CharmSync)
|
||||
local flatten = CharmSync.flatten
|
||||
|
||||
return function()
|
||||
it("flattens atoms", function()
|
||||
local input = {
|
||||
a = atom(0),
|
||||
b = { c = atom(0) },
|
||||
d = { e = { f = atom(0) } },
|
||||
}
|
||||
local result = flatten(input)
|
||||
|
||||
expect(result.a).to.equal(input.a)
|
||||
expect(result["b/c"]).to.equal(input.b.c)
|
||||
expect(result["d/e/f"]).to.equal(input.d.e.f)
|
||||
|
||||
expect(result.b).to.never.be.ok()
|
||||
expect(result.d).to.never.be.ok()
|
||||
end)
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue