Skip to content

Commit 36cd391

Browse files
committed
Add test to confirm Enums serde properly
1 parent a10a3e6 commit 36cd391

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/roblox/instance/properties.luau

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,16 @@ part.Shape = Enum.PartType.Ball
3333

3434
assert(part.Shape == Enum.PartType.Ball)
3535

36+
-- Enums should roundtrip through serde without problem
37+
38+
local decal = Instance.new("Decal")
39+
decal.Face = Enum.NormalId.Top
40+
41+
local decal_ser = roblox.serializeModel({ decal })
42+
local decal_de = roblox.deserializeModel(decal_ser)
43+
44+
assert(decal_de[1].Face == Enum.NormalId.Top)
45+
3646
-- Properties that don't exist for a class should error
3747

3848
local meshPart = Instance.new("MeshPart")

0 commit comments

Comments
 (0)