Skip to content

Commit

Permalink
refactor(plugins): general testing plugins file
Browse files Browse the repository at this point in the history
  • Loading branch information
ecosse3 committed Jul 21, 2024
1 parent ed3bd2f commit 380264a
Show file tree
Hide file tree
Showing 2 changed files with 110 additions and 87 deletions.
87 changes: 0 additions & 87 deletions lua/plugins/neotest.lua

This file was deleted.

110 changes: 110 additions & 0 deletions lua/plugins/testing.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
return {
{
"andythigpen/nvim-coverage",
dependencies = "nvim-lua/plenary.nvim",
cmd = {
"Coverage",
"CoverageSummary",
"CoverageLoad",
"CoverageShow",
"CoverageHide",
"CoverageToggle",
"CoverageClear",
},
config = function()
require("coverage").setup()
end,
},

{
"nvim-neotest/neotest",
dependencies = {
"nvim-neotest/nvim-nio",
"nvim-lua/plenary.nvim",
"nvim-treesitter/nvim-treesitter",
"antoinemadec/FixCursorHold.nvim",
"nvim-neotest/neotest-jest",
},
config = function()
require('neotest').setup {
adapters = {
require("neotest-jest")({
jestCommand = "npm test --",
env = { CI = true },
cwd = function(path)
return vim.fn.getcwd()
end,
}),
},
diagnostic = {
enabled = false
},
floating = {
border = EcoVim.ui.float.border or "rounded",
max_height = 0.6,
max_width = 0.6
},
highlights = {
adapter_name = "NeotestAdapterName",
border = "NeotestBorder",
dir = "NeotestDir",
expand_marker = "NeotestExpandMarker",
failed = "NeotestFailed",
file = "NeotestFile",
focused = "NeotestFocused",
indent = "NeotestIndent",
namespace = "NeotestNamespace",
passed = "NeotestPassed",
running = "NeotestRunning",
skipped = "NeotestSkipped",
test = "NeotestTest"
},
icons = {
child_indent = "",
child_prefix = "",
collapsed = "",
expanded = "",
failed = "",
final_child_indent = " ",
final_child_prefix = "",
non_collapsible = "",
passed = "",
running = "",
skipped = "",
unknown = "?"
},
output = {
enabled = true,
open_on_run = true,
},
run = {
enabled = true
},
status = {
enabled = true
},
strategies = {
integrated = {
height = 40,
width = 120
}
},
summary = {
enabled = true,
expand_errors = true,
follow = true,
mappings = {
attach = "a",
expand = { "<CR>", "<2-LeftMouse>" },
expand_all = "e",
jumpto = "i",
output = "o",
run = "r",
short = "O",
stop = "u"
}
}
}
end
}
}

0 comments on commit 380264a

Please sign in to comment.