Skip to content

Commit

Permalink
chore(busted): move tests to separate file for simplicity
Browse files Browse the repository at this point in the history
  • Loading branch information
vhyrro committed May 21, 2024
1 parent 7ff09f7 commit b923599
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 14 deletions.
3 changes: 1 addition & 2 deletions .busted
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ return {
_all = {
coverage = false,
lpath = "lua/?.lua;lua/?/init.lua",
pattern = "module%.lua$",
-- auto_insulate = false,
pattern = "tests%.lua$",
ROOT = { "lua/" },
},
default = {
Expand Down
1 change: 0 additions & 1 deletion lua/neorg/core/modules.lua
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ local utils = require("neorg.core.utils")
--- @field setup? fun(): neorg.module.setup? Function that is invoked before any other loading occurs. Should perform preliminary startup tasks.
--- @field replaced? boolean If `true`, this means the module is a replacement for a core module. This flag is set automatically whenever `setup().replaces` is set to a value.
--- @field on_event fun(event: neorg.event) A callback that is invoked any time an event the module has subscribed to has fired.
--- @field tests function A function for running tests.

local modules = {}

Expand Down
11 changes: 0 additions & 11 deletions lua/neorg/modules/core/integrations/treesitter/module.lua
Original file line number Diff line number Diff line change
Expand Up @@ -911,15 +911,4 @@ module.events.subscribed = {
},
}

module.tests = function()
describe(
"initial test to see if CI works (cannot be tested on a branch, must be tested on main, `act` doesn't work here, help)",
function()
it("should be working", function()
assert.truthy("Yessir.")
end)
end
)
end

return module
10 changes: 10 additions & 0 deletions lua/neorg/modules/core/integrations/treesitter/tests.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
describe(
"initial test to see if CI works (cannot be tested on a branch, must be tested on main, `act` doesn't work here, help)",
function()
local _ = require("neorg.modules.core.integrations.treesitter.module")

it("should be working", function()
assert.truthy("Yessir.")
end)
end
)

0 comments on commit b923599

Please sign in to comment.