Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No tests found #1

Open
jonathan-raines opened this issue Jun 7, 2022 · 1 comment
Open

No tests found #1

jonathan-raines opened this issue Jun 7, 2022 · 1 comment

Comments

@jonathan-raines
Copy link

jonathan-raines commented Jun 7, 2022

Hello! I'm super excited about this plugin. I'm running into a No tests found error when trying to run both lua require("neotest").run.run() and lua require("neotest").run.run(vim.fn.expand("%")) from a test file.

I do have a custom transformation as the code base is dockerized. Here's the vim-test custom transformation.

 vim.api.nvim_exec(
   [[
   function! DockerTransform(cmd)
     return "docker-compose exec $(tmux display-message -p '#S') " .a:cmd
   endfunction
 ]] ,
   false
 )

 vim.cmd [[ let test#custom_transformations = {'docker': function('DockerTransform')}]]
 vim.cmd [[ let test#transformation = 'docker']]
 vim.cmd [[ let g:test#basic#start_normal = 1 " If using basic strategy ]]
end

I tried removing the transformation, which causes errors with vim-test, and I don't receive the No tests found messages anymore but nothing else happens either. No UI popup or anything.

Here's my packer configuration for Neotest

  use {
    'rcarriga/neotest',
    config = function()
      require 'neotest'.setup {
        adapters = {
          require 'neotest-vim-test' {
            ignore_file_types = { 'python', 'vim', 'lua' },
          },
        },
      }
    end,
    requires = {
      'nvim-lua/plenary.nvim',
      'nvim-treesitter/nvim-treesitter',
      'antoinemadec/FixCursorHold.nvim',
      'rcarriga/neotest-vim-test'
    }
  }

If there's more information I can provide, please let me know!

@rcarriga
Copy link
Collaborator

rcarriga commented Jun 8, 2022

Thanks for the report! I've never actually used the transformations before so could be that or it could something else. If you could provide a sample repo or some other reproduction that'd be great, otherwise I'll put some time into trying to reproduce myself

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants