all repos

gopher.nvim @ 09696900a53686288afed5c757b449b7b3be1c76

Minimalistic plugin for Go development
1 files changed, 22 insertions(+), 0 deletions(-)
test: add test for config
Author: Olexandr Smirnov olexsmir@gmail.com
Committed at: 2025-08-27 20:56:07 +0300
Parent: 6f96488
A spec/unit/config_test.lua

@@ -0,0 +1,22 @@

+local t = require "spec.testutils" +local _, T = t.setup "config" + +T["config"]["can be called without any arguments passed"] = function() + ---@diagnostic disable-next-line: missing-parameter + require("gopher").setup() +end + +T["config"]["can be called with empty table"] = function() + require("gopher").setup {} +end + +T["config"]["should change option"] = function() + local log_level = 1234567890 + require("gopher").setup { + log_level = log_level, + } + + t.eq(log_level, require("gopher.config").log_level) +end + +return T