From 40105515d274909aaaf1234df97b0f65a23fd670 Mon Sep 17 00:00:00 2001 From: Lucien Greathouse Date: Tue, 1 Oct 2019 18:41:33 -0700 Subject: [PATCH] plugin: Unify test running code --- plugin/src/init.server.lua | 2 +- plugin/src/runTests.lua | 5 +++++ plugin/testBootstrap.server.lua | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 plugin/src/runTests.lua diff --git a/plugin/src/init.server.lua b/plugin/src/init.server.lua index dce195ef..c249171b 100644 --- a/plugin/src/init.server.lua +++ b/plugin/src/init.server.lua @@ -28,5 +28,5 @@ end) if Config.isDevBuild then local TestEZ = require(script.Parent.TestEZ) - TestEZ.TestBootstrap:run({script}) + require(script.runTests)(TestEZ) end \ No newline at end of file diff --git a/plugin/src/runTests.lua b/plugin/src/runTests.lua new file mode 100644 index 00000000..ea6172c2 --- /dev/null +++ b/plugin/src/runTests.lua @@ -0,0 +1,5 @@ +return function(TestEZ) + local Rojo = script.Parent.Parent + + TestEZ.TestBootstrap:run({ Rojo.Plugin, Rojo.Http, Rojo.Log }) +end \ No newline at end of file diff --git a/plugin/testBootstrap.server.lua b/plugin/testBootstrap.server.lua index 12f6b5f0..a9ebcdf6 100644 --- a/plugin/testBootstrap.server.lua +++ b/plugin/testBootstrap.server.lua @@ -12,7 +12,7 @@ if setDevSettings then DevSettings:createTestSettings() end -TestEZ.TestBootstrap:run({ Rojo.Plugin, Rojo.Http, Rojo.Log }) +require(Rojo.Plugin.runTests)(TestEZ) if setDevSettings then DevSettings:resetValues()