nvim-neotest / neotest

An extensible framework for interacting with tests within NeoVim.
MIT License
2.26k stars 110 forks source link

[BUG] Jest: parametrised tests giving incorrect output and icon #97

Closed prudnikovsv closed 2 years ago

prudnikovsv commented 2 years ago

NeoVim Version NVIM v0.8.0-dev-827-gb6a963bde

Describe the bug When running jest parametrised tests as run whole file, plugin marks passed tests as failed, see: image When output is saying that they passed, see: Screenshot 2022-08-22 at 12 08 18

As well as, when running plugin with "run nearest test" adn test is parametrised, I get same error state, and on top of that 0 output, see: image

To Reproduce Configuration:

my.nnoremap("<leader>tt", ":lua require('neotest').run.stop()<CR>")
my.nnoremap("<leader>tn", ":lua require('neotest').run.run()<CR>")
my.nnoremap("<leader>td", ":lua require('neotest').run.run({ strategy = 'dap'})<CR>")
my.nnoremap("<leader>tf", ":lua require('neotest').run.run(vim.fn.expand('%'))<CR>")

my.nnoremap("<leader>ts", ":lua require('neotest').summary.toggle()<CR>")
my.nnoremap("<leader>to", ":lua require('neotest').output.open()<CR>")

require("neotest").setup({
    adapters = {
        require("neotest-jest"),
    },
    output = {
        enable = true,
        open_on_run = true,
    },
})

You can edit the following example file to include your adapters and other required setup.

-- install packer

packer.startup(function(use)
  ...
    use({
            "nvim-neotest/neotest",
            requires = {
                "nvim-lua/plenary.nvim",
                "nvim-treesitter/nvim-treesitter",
                "antoinemadec/FixCursorHold.nvim",
                "haydenmeade/neotest-jest",
            },
        })
 ...

Steps to reproduce the behavior:

rcarriga commented 2 years ago

This is a neotest-jest issue https://github.com/haydenmeade/neotest-jest/issues/2