add testing...
this is very limited right now, but I will expand as I see fit
This commit is contained in:
4
Makefile
Normal file
4
Makefile
Normal file
@ -0,0 +1,4 @@
|
||||
test:
|
||||
nvim --headless -c "PlenaryBustedDirectory tests/ {minimal_init = './tests/minit.lua'}"
|
||||
|
||||
.PHONY: test
|
20
tests/dep_spec.lua
Normal file
20
tests/dep_spec.lua
Normal file
@ -0,0 +1,20 @@
|
||||
---@diagnostic disable: undefined-global, undefined-field
|
||||
local dep_ui_format = require("dep.ui.format")
|
||||
|
||||
describe("ui log formatting", function()
|
||||
it("returns the proper chunks to print a formatted line", function()
|
||||
assert.same(
|
||||
{
|
||||
{ "[", "" },
|
||||
{ "11:22:33", "Boolean" },
|
||||
{ "] ", "" },
|
||||
{ "file.lua", "String" },
|
||||
{ ":", "" },
|
||||
{ "1", "Number" },
|
||||
{ ": ", "" },
|
||||
{ "some fancy message", "" }
|
||||
},
|
||||
dep_ui_format.log_line("[11:22:33] file.lua:1:(vim) some fancy message")
|
||||
)
|
||||
end)
|
||||
end)
|
1
tests/minit.lua
Normal file
1
tests/minit.lua
Normal file
@ -0,0 +1 @@
|
||||
vim.opt.rtp:prepend(".")
|
Reference in New Issue
Block a user