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

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

Closed
prudnikovsv opened this issue Aug 22, 2022 · 1 comment
Closed
Assignees

Comments

@prudnikovsv
Copy link

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:

  • Create parameterized test with file extension TS
  • Go to test file
  • Simply run test using plugin
@rcarriga
Copy link
Collaborator

This is a neotest-jest issue nvim-neotest/neotest-jest#2

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