dotfiles/nvim/lua/jester_config.lua

23 lines
1013 B
Lua
Raw Normal View History

2022-05-24 08:56:38 +02:00
require'jester'.setup({
cmd = "yarn run test -t '$result' -- $file", -- run command
identifiers = {"test", "it"}, -- used to identify tests
prepend = {"describe"}, -- prepend describe blocks
expressions = {"call_expression"}, -- tree-sitter object used to scan for tests/describe blocks
path_to_jest_run = './node_modules/jest/bin/jest', -- used to run tests
path_to_jest_debug = './node_modules/jest/bin/jest', -- used for debugging
terminal_cmd = ":vsplit | terminal", -- used to spawn a terminal for running tests, for debugging refer to nvim-dap's config
dap = { -- debug adapter configuration
2023-07-26 10:59:49 +02:00
type = 'pwa-node',
2022-05-24 08:56:38 +02:00
request = 'launch',
cwd = vim.fn.getcwd(),
runtimeArgs = {'--inspect-brk', '$path_to_jest', '--no-coverage', '-t', '$result', '--', '$file'},
args = { '--no-cache' },
sourceMaps = 'inline',
protocol = 'inspector',
skipFiles = {'<node_internals>/**/*.js'},
console = 'integratedTerminal',
port = 9229,
disableOptimisticBPs = true
}
})