From 9524f9ad68a0bd14fd0b20c87385b4b3424ed12a Mon Sep 17 00:00:00 2001 From: Stephen Leitnick Date: Tue, 10 Dec 2024 10:27:12 -0500 Subject: [PATCH] Adjust test --- modules/shake/init.test.luau | 27 +++++++++++++++------------ test/wally.toml | 3 --- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/modules/shake/init.test.luau b/modules/shake/init.test.luau index 9d62f93d..b7adb3a1 100644 --- a/modules/shake/init.test.luau +++ b/modules/shake/init.test.luau @@ -66,7 +66,7 @@ return function(ctx: Test.TestContext) end local shake2 = shake1:Clone() ctx:Expect(shake2):ToBeA("table") - ctx:Expect(getmetatable(shake2)):ToBe(Shake) + ctx:Expect(getmetatable(shake2)):ToBe(getmetatable(shake1)) ctx:Expect(shake2):Not():ToBe(shake1) local clonedFields = { "Amplitude", @@ -79,7 +79,7 @@ return function(ctx: Test.TestContext) "RotationInfluence", "TimeFunction", } - for _, field in ipairs(clonedFields) do + for _, field in clonedFields do ctx:Expect(shake1[field]):ToBe(shake2[field]) end end) @@ -249,16 +249,19 @@ return function(ctx: Test.TestContext) ctx:Expect(connection.Connected):ToBe(false) end) - ctx:Test("should bind to render step", function() - local shake = Shake.new() - shake.SustainTime = 0.1 - shake:Start() - local bound = false - shake:BindToRenderStep("ShakeTest", Enum.RenderPriority.Last.Value, function() - bound = true + -- RenderStepped only works on the client: + if RunService:IsClient() and RunService:IsRunning() then + ctx:Test("should bind to render step", function() + local shake = Shake.new() + shake.SustainTime = 0.1 + shake:Start() + local bound = false + shake:BindToRenderStep("ShakeTest", Enum.RenderPriority.Last.Value, function() + bound = true + end) + AwaitStop(shake) + ctx:Expect(bound):ToBe(true) end) - AwaitStop(shake) - ctx:Expect(bound):ToBe(true) - end) + end end) end diff --git a/test/wally.toml b/test/wally.toml index 825326d4..2d14a754 100644 --- a/test/wally.toml +++ b/test/wally.toml @@ -3,6 +3,3 @@ name = "sleit/rbxutil" version = "0.1.0" registry = "https://github.com/UpliftGames/wally-index" realm = "shared" - -[dependencies] -TestEZ = "roblox/testez@^0.4.1"