-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
test.lua
41 lines (38 loc) · 1.43 KB
/
test.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
return {
'klen/nvim-test',
after = 'nvim-treesitter', -- it requires 'nvim-treesitter.ts_utils'
config = function(config)
require('nvim-test').setup(config.test)
end,
defaultConfig = {
{ 'test' },
{
run = true, -- run tests (using for debug)
commands_create = true, -- create commands (TestFile, TestLast, ...)
filename_modifier = ':.', -- modify filenames before tests run(:h filename-modifiers)
silent = false, -- less notifications
term = 'terminal', -- a terminal to run ("terminal"|"toggleterm")
termOpts = {
direction = 'vertical', -- terminal's direction ("horizontal"|"vertical"|"float")
width = 96, -- terminal's width (for vertical|float)
height = 24, -- terminal's height (for horizontal|float)
go_back = false, -- return focus to original window after executing
stopinsert = 'auto', -- exit from insert mode (true|false|"auto")
keep_one = true, -- keep only one terminal for testing
},
runners = { -- setup tests runners
cs = 'nvim-test.runners.dotnet',
go = 'nvim-test.runners.go-test',
haskell = 'nvim-test.runners.hspec',
javacriptreact = 'nvim-test.runners.jest',
javascript = 'nvim-test.runners.jest',
lua = 'nvim-test.runners.busted',
python = 'nvim-test.runners.pytest',
ruby = 'nvim-test.runners.rspec',
rust = 'nvim-test.runners.cargo-test',
typescript = 'nvim-test.runners.jest',
typescriptreact = 'nvim-test.runners.jest',
},
},
},
}