test(_utils): test .sreq method
This commit is contained in:
parent
9204f3ee8d
commit
82e739d823
1 changed files with 14 additions and 0 deletions
|
|
@ -12,4 +12,18 @@ describe("gopher._utils", function()
|
||||||
assert.are.same(res, true)
|
assert.are.same(res, true)
|
||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
describe(".sreq()", function()
|
||||||
|
local sreq = require("gopher._utils").sreq
|
||||||
|
|
||||||
|
it("return module if it exists", function()
|
||||||
|
assert.are.same(sreq "gopher", require "gopher")
|
||||||
|
end)
|
||||||
|
|
||||||
|
it("throw error if it doesn't exist", function()
|
||||||
|
assert.has.errors(function()
|
||||||
|
sreq "no_existing_module"
|
||||||
|
end)
|
||||||
|
end)
|
||||||
|
end)
|
||||||
end)
|
end)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue