Skip to content

Commit 5b0da01

Browse files
authored
perf(test): improve test cases (#135)
1 parent b8de083 commit 5b0da01

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

lua/colorbox.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ local function update(opts)
423423
})
424424

425425
local home_dir = vim.fn["colorbox#base_dir"]()
426-
local packstart = string.format("%s/pack/colorbox/start", home_dir)
426+
-- local packstart = string.format("%s/pack/colorbox/start", home_dir)
427427
-- logger.debug(
428428
-- "|colorbox.init| home_dir:%s, pack:%s",
429429
-- vim.inspect(home_dir),

test/colorbox_spec.lua

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,14 @@ describe("colorbox", function()
99
vim.api.nvim_command("cd " .. cwd)
1010
end)
1111

12+
local github_actions = os.getenv("GITHUB_ACTIONS") == "true"
1213
local colorbox = require("colorbox")
1314
describe("[setup]", function()
1415
it("setup", function()
15-
-- colorbox.update()
16-
-- colorbox.setup()
16+
if not github_actions then
17+
colorbox.update()
18+
colorbox.setup()
19+
end
1720
end)
1821
end)
1922
end)

test/db_spec.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
local cwd = vim.fn.getcwd()
22

3-
describe("db", function()
3+
describe("colorbox.db", function()
44
local assert_eq = assert.is_equal
55
local assert_true = assert.is_true
66
local assert_false = assert.is_false

0 commit comments

Comments
 (0)