Skip to content

Commit

Permalink
Test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Sleitnick committed Dec 8, 2021
1 parent 9e759b6 commit 6e265d5
Show file tree
Hide file tree
Showing 13 changed files with 22 additions and 33 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
run: rojo build default.project.json -o test.rbxl

- name: Run tests
run: run-in-roblox --place test.rbxl --script ci.lua > test-out.txt
run: run-in-roblox --place test.rbxl --script ci\\unit.server.lua > test-out.txt
continue-on-error: true
timeout-minutes: 3

Expand Down
2 changes: 1 addition & 1 deletion TEST.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Testing requires Python, Wally, Rojo, and Roblox Studio.

1. Run `python build_tests.py` or `python build_tests.py watch`
2. Run `rojo`
2. Run `rojo` against `test.project.json`
3. Sync project into a new Roblox Studio place
4. Run the Roblox Studio place
5. Check output window for test status
13 changes: 0 additions & 13 deletions ci.lua → ci/unit.server.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,6 @@ print("Running unit tests...")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local TestEZ = require(ReplicatedStorage.Test.Packages.TestEZ)

-- local tests = {}
-- for _,testFolder in ipairs(TestService.modules:GetChildren()) do
-- local name = testFolder.Name:match("(.+)_test$")
-- local module = testFolder:FindFirstChild(name)
-- if module then
-- table.insert(tests, module)
-- else
-- print("Failed to find module within " .. testFolder.Name)
-- end
-- end

-- TestEZ.TestBootstrap:run(tests)

-- Clear out package test files
for _,testFolder in ipairs(ReplicatedStorage.Test.modules:GetChildren()) do
local index = testFolder:FindFirstChild("_Index")
Expand Down
2 changes: 0 additions & 2 deletions modules/component/init.spec.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
print("Running test for " .. script.Parent.Name)

return function()

local Component = require(script.Parent)
Expand Down
2 changes: 0 additions & 2 deletions modules/enum-list/init.spec.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
print("Running test for " .. script.Parent.Name)

return function()

local EnumList = require(script.Parent)
Expand Down
2 changes: 0 additions & 2 deletions modules/option/init.spec.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
print("Running test for " .. script.Parent.Name)

return function()

local Option = require(script.Parent)
Expand Down
2 changes: 0 additions & 2 deletions modules/ser/init.spec.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
print("Running test for " .. script.Parent.Name)

return function()

local Ser = require(script.Parent)
Expand Down
2 changes: 0 additions & 2 deletions modules/signal/init.spec.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
print("Running test for " .. script.Parent.Name)

local function AwaitCondition(predicate, timeout)
local start = os.clock()
timeout = (timeout or 10)
Expand Down
2 changes: 0 additions & 2 deletions modules/symbol/init.spec.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
print("Running test for " .. script.Parent.Name)

return function()

local Symbol = require(script.Parent)
Expand Down
2 changes: 0 additions & 2 deletions modules/table-util/init.spec.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
print("Running test for " .. script.Parent.Name)

return function()

local TableUtil = require(script.Parent)
Expand Down
3 changes: 1 addition & 2 deletions modules/timer/init.spec.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
print("Running test for " .. script.Parent.Name)

return function()

local Timer = require(script.Parent)
Expand All @@ -10,6 +8,7 @@ return function()

beforeEach(function()
timer = Timer.new(0.1)
timer.TimeFunction = os.clock
end)

afterEach(function()
Expand Down
2 changes: 0 additions & 2 deletions modules/trove/init.spec.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
print("Running test for " .. script.Parent.Name)

return function()

local Trove = require(script.Parent)
Expand Down
19 changes: 19 additions & 0 deletions test.project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "rbx-util",
"tree": {
"$className": "DataModel",
"ReplicatedStorage": {
"$className": "ReplicatedStorage",
"Test": {
"$path": "test"
}
},
"TestService": {
"$className": "TestService",
"$path": "ci",
"$properties": {
"ExecuteWithStudioRun": true
}
}
}
}

0 comments on commit 6e265d5

Please sign in to comment.