all repos

gopher.nvim @ v0.6.0

Minimalistic plugin for Go development

gopher.nvim/spec/unit/config_test.lua(view raw)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
local t = require "spec.testutils"
local _, T, config = t.setup "config"

config["can be called without any arguments passed"] = function()
  ---@diagnostic disable-next-line: missing-parameter
  require("gopher").setup()
end

config["can be called with empty table"] = function()
  ---@diagnostic disable-next-line: missing-fields
  require("gopher").setup {}
end

config["should change option"] = function()
  local log_level = 1234567890

  ---@diagnostic disable-next-line: missing-fields
  require("gopher").setup {
    log_level = log_level,
  }

  t.eq(log_level, require("gopher.config").log_level)
end

return T