Neotest config for mocha tests to run on host instead of docker

This should really be a config set in the project and not a global thing
but whatever.
This commit is contained in:
Tyler Hallada 2024-06-10 17:50:17 -04:00
parent 13059ec752
commit 132504fbc0

View File

@ -7,7 +7,7 @@ return {
return { return {
adapters = { adapters = {
["neotest-mocha"] = { ["neotest-mocha"] = {
command = "docker exec -it api-app npm run test:integration --", command = "npx ts-mocha --config ./test-integration/.mocharc.json -r tsconfig-paths/register -r ./test/config-mutation-setup.ts -r ./test-integration/hooks.ts",
command_args = function(context) command_args = function(context)
-- The context contains: -- The context contains:
-- results_path: The file that json results are written to -- results_path: The file that json results are written to
@ -26,7 +26,7 @@ return {
relative_path, relative_path,
} }
end, end,
env = { CI = true }, env = { CI = true, NODE_OPTIONS = "--trace-warnings --max-old-space-size=8192", NODE_ENV = "test" },
cwd = function() cwd = function()
return vim.fn.getcwd() return vim.fn.getcwd()
end, end,