You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
918 B

  1. local neotest = require('neotest')
  2. vim.keymap.set('n', '<leader>tr', function () neotest.run.run() end)
  3. vim.keymap.set('n', '<leader>tR', function () neotest.run.run_last() end)
  4. vim.keymap.set('n', '<leader>tf', function () neotest.run.run(vim.fn.expand('%')) end)
  5. vim.keymap.set('n', '<leader>tS', function () neotest.run.stop() end)
  6. vim.keymap.set('n', '<leader>ta', function () neotest.run.attach() end)
  7. vim.keymap.set('n', '<leader>to', function () neotest.output.open() end)
  8. vim.keymap.set('n', '<leader>ts', function () neotest.summary.toggle() end)
  9. neotest.setup({
  10. adapters = {
  11. require("neotest-phpunit")({
  12. root_files = { "phpunit.xml", "composer.json" },
  13. phpunit_cmd = { "docker-compose", "exec", "fpm", "./vendor/bin/phpunit" },
  14. filter_dirs = { "vendor" },
  15. mapped_docker_dir = "/var/www",
  16. append_to_cwd = '/api'
  17. }),
  18. },
  19. })