feat: add support for named tests
This commit is contained in:
parent
5592deba21
commit
d5ff2a74fe
2 changed files with 7 additions and 0 deletions
|
|
@ -27,6 +27,9 @@ local default_config = {
|
|||
-- path to a directory containing custom test code templates
|
||||
---@type string|nil
|
||||
template_dir = nil,
|
||||
-- switch table tests from using slice to map (with test name for the key)
|
||||
---@type boolean
|
||||
named = false,
|
||||
},
|
||||
---@class gopher.ConfigGoTag
|
||||
gotag = {
|
||||
|
|
|
|||
|
|
@ -6,6 +6,10 @@ local gotests = {}
|
|||
|
||||
---@param args table
|
||||
local function add_test(args)
|
||||
if c.gotests.named then
|
||||
table.insert(args, "-named")
|
||||
end
|
||||
|
||||
if c.gotests.template_dir then
|
||||
table.insert(args, "-template_dir")
|
||||
table.insert(args, c.gotests.template_dir)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue