Add test to confirm Enums serde properly

This commit is contained in:
Micah 2025-04-03 12:23:04 -07:00
parent a10a3e677f
commit 36cd391305
No known key found for this signature in database

View file

@ -33,6 +33,16 @@ part.Shape = Enum.PartType.Ball
assert(part.Shape == Enum.PartType.Ball)
-- Enums should roundtrip through serde without problem
local decal = Instance.new("Decal")
decal.Face = Enum.NormalId.Top
local decal_ser = roblox.serializeModel({ decal })
local decal_de = roblox.deserializeModel(decal_ser)
assert(decal_de[1].Face == Enum.NormalId.Top)
-- Properties that don't exist for a class should error
local meshPart = Instance.new("MeshPart")