+22
spec/unit/config_test.lua
+22
spec/unit/config_test.lua
···
1
+
local t = require "spec.testutils"
2
+
local _, T = t.setup "config"
3
+
4
+
T["config"]["can be called without any arguments passed"] = function()
5
+
---@diagnostic disable-next-line: missing-parameter
6
+
require("gopher").setup()
7
+
end
8
+
9
+
T["config"]["can be called with empty table"] = function()
10
+
require("gopher").setup {}
11
+
end
12
+
13
+
T["config"]["should change option"] = function()
14
+
local log_level = 1234567890
15
+
require("gopher").setup {
16
+
log_level = log_level,
17
+
}
18
+
19
+
t.eq(log_level, require("gopher.config").log_level)
20
+
end
21
+
22
+
return T