spec: change way how tests srtuctured

This commit is contained in:
Smirnov Oleksandr 2023-07-20 00:52:42 +03:00
parent 9fc120edc5
commit c608ddbd67
4 changed files with 0 additions and 58 deletions

19
spec/units/utils_spec.lua Normal file
View file

@ -0,0 +1,19 @@
describe("gopher._utils", function()
it("can be requried", function()
require "gopher._utils"
end)
it(".empty() with non-empty talbe", function()
local empty = require("gopher._utils").empty
local res = empty { first = "1", second = 2 }
assert.are.same(res, false)
end)
it(".empty() with empty talbe", function()
local empty = require("gopher._utils").empty
local res = empty {}
assert.are.same(res, true)
end)
end)