WIP: Epiphany Refactor (#85)

This commit is contained in:
Lucien Greathouse
2018-08-26 01:03:53 -07:00
committed by GitHub
parent 80b9b7594b
commit 72bc77f1d5
52 changed files with 1145 additions and 2157 deletions

View File

@@ -2,37 +2,14 @@
Loads our library and all of its dependencies, then runs tests using TestEZ.
]]
-- If you add any dependencies, add them to this table so they'll be loaded!
local LOAD_MODULES = {
{"src", "plugin"},
{"modules/promise/lib", "Promise"},
{"modules/testez/lib", "TestEZ"},
}
local loadEnvironment = require("loadEnvironment")
-- This makes sure we can load Lemur and other libraries that depend on init.lua
package.path = package.path .. ";?/init.lua"
-- If this fails, make sure you've run `lua bin/install-dependencies.lua` first!
local lemur = require("modules.lemur")
-- Create a virtual Roblox tree
local habitat = lemur.Habitat.new()
-- We'll put all of our library code and dependencies here
local Root = lemur.Instance.new("Folder")
Root.Name = "Root"
-- Load all of the modules specified above
for _, module in ipairs(LOAD_MODULES) do
local container = habitat:loadFromFs(module[1])
container.Name = module[2]
container.Parent = Root
end
local habitat, modules = loadEnvironment()
-- Load TestEZ and run our tests
local TestEZ = habitat:require(Root.TestEZ)
local TestEZ = habitat:require(modules.TestEZ)
local results = TestEZ.TestBootstrap:run(Root.plugin, TestEZ.Reporters.TextReporter)
local results = TestEZ.TestBootstrap:run(modules.Rojo, TestEZ.Reporters.TextReporter)
-- Did something go wrong?
if results.failureCount > 0 then