Skip to content

Commit

Permalink
Cov
Browse files Browse the repository at this point in the history
  • Loading branch information
kbarber committed May 29, 2018
1 parent cfeb808 commit b57b4f7
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 9 deletions.
17 changes: 12 additions & 5 deletions src/Models/Core/MainModule/UI/Components/AssetItem.spec.lua
Expand Up @@ -6,11 +6,18 @@ return function()
expect(AssetItem).to.be.ok()
end)

--[[
--- @TODO cannot emulate marketplaceservice yet
it("should new ok", function()
expect(AssetItem:init()).to.be.ok()
it("should init", function()
--- @TODO we currently can't emulate marketplace service
expect(function()
AssetItem:init()
end).to.throw()
end)

it("should render", function()
--- @TODO we need init to work first
expect(function()
AssetItem:render()
end).to.throw()
end)
--]]
end)
end
Expand Up @@ -11,5 +11,9 @@ return function()
Plugin = "foo",
})).never.to.be.ok()
end)

it("should render", function()
expect(AssetsWidget:render()).to.be.ok()
end)
end)
end
Expand Up @@ -15,7 +15,12 @@ function ConfigurationWidget:init(_)
CurrentSelection = nil,
}
self:HandleSelectionChange(game.Selection.SelectionChanged)
local sel = game:FindFirstChild("Selection")
if sel then
self:HandleSelectionChange(sel.SelectionChanged)
else
warn("No selection service found")
end
end
function ConfigurationWidget:render()
Expand Down
Expand Up @@ -6,10 +6,12 @@ return function()
expect(ConfigurationWidget).to.be.ok()
end)

--[[ @TODO no support for selection
it("should new ok", function()
it("should init", function()
expect(ConfigurationWidget:init({})).never.to.be.ok()
end)
--]]

it("should render", function()
expect(ConfigurationWidget:render()).to.be.ok()
end)
end)
end
4 changes: 4 additions & 0 deletions src/Models/Core/MainModule/UI/Components/Dropdown.spec.lua
Expand Up @@ -9,5 +9,9 @@ return function()
it("should new ok", function()
expect(Dropdown:init({})).never.to.be.ok()
end)

it("should render", function()
expect(Dropdown:render()).to.be.ok()
end)
end)
end
5 changes: 5 additions & 0 deletions src/Models/Core/MainModule/UI/Components/TextLabel.spec.lua
Expand Up @@ -9,5 +9,10 @@ return function()
it("should new ok", function()
expect(TextLabel:init({})).never.to.be.ok()
end)

it("should render", function()
expect(TextLabel:render()).to.be.ok()
end)

end)
end

0 comments on commit b57b4f7

Please sign in to comment.