refactor(tests): start migration to mini.test
This commit is contained in:
parent
6769cafc55
commit
30a26bcda2
8 changed files with 35 additions and 29 deletions
31
tests/units/test_config.lua
Normal file
31
tests/units/test_config.lua
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
local eq = MiniTest.expect.equality
|
||||
|
||||
describe("gopher.config", function()
|
||||
it(".setup() should provide default when .setup() is not called", function()
|
||||
local c = require "gopher.config"
|
||||
|
||||
eq(c.commands.go, "go")
|
||||
eq(c.commands.gomodifytags, "gomodifytags")
|
||||
eq(c.commands.gotests, "gotests")
|
||||
eq(c.commands.impl, "impl")
|
||||
eq(c.commands.iferr, "iferr")
|
||||
eq(c.commands.dlv, "dlv")
|
||||
end)
|
||||
|
||||
it(".setup() should change options on users config", function()
|
||||
local c = require "gopher.config"
|
||||
c.setup {
|
||||
commands = {
|
||||
go = "go1.420",
|
||||
gomodifytags = "iDontUseRustBtw",
|
||||
},
|
||||
}
|
||||
|
||||
eq(c.commands.go, "go1.420")
|
||||
eq(c.commands.gomodifytags, "iDontUseRustBtw")
|
||||
eq(c.commands.gotests, "gotests")
|
||||
eq(c.commands.impl, "impl")
|
||||
eq(c.commands.iferr, "iferr")
|
||||
eq(c.commands.dlv, "dlv")
|
||||
end)
|
||||
end)
|
||||
Loading…
Add table
Add a link
Reference in a new issue