mclaughlinconnor / neotest-mocha

Neotest runner for Mocha test framework

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

neotest-mocha

build

This plugin provides a Mocha adapter for the Neotest framework.

It is currently a work in progress. It will be transferred to the official neotest organisation (once it's been created).

Installation

Using packer:

use({
  'rcarriga/neotest',
  requires = {
    ...,
    'nvim-neotest/neotest-mocha',
  }
  config = function()
    require('neotest').setup({
      ...,
      adapters = {
        require('neotest-mocha')({
          command = "npm test --",
          env = { CI = true },
          cwd = function(path)
            return vim.fn.getcwd()
          end,
        }),
      }
    })
  end
})

Usage

See neotest's documentation for more information on how to run tests.

🎁 Contributing

Please raise a PR if you are interested in adding new functionality or fixing any bugs. When submitting a bug, please include an example spec that can be tested.

To trigger the tests for the adapter, run:

./scripts/test

Bug Reports

Please file any bug reports and I might take a look if time permits otherwise please submit a PR, this plugin is intended to be by the community for the community.

Inspiration

Thanks to haydenmeade and all the contributors from neotest-jest for doing the hard work.

About

Neotest runner for Mocha test framework


Languages

Language:Lua 92.4%Language:JavaScript 5.2%Language:Shell 2.0%Language:Vim Script 0.4%