Giter Site home page Giter Site logo

coc-jest's Introduction

coc-inline-jest

Best Jest plugin for coc.nvim.

Screenshot of the tool

Features

  • Starts Jest automatically when you're in a root folder project with Jest installed.
  • Display failed test cases on gitter.
  • Highlights the errors next to the expect functions.
  • Navigate between list of failed test cases. (Using :CocList diagnostics)
  • Work with Create React App out-of-the-box.
  • Customized icons.
  • Display passed test cases on gitter.
  • Zero configuration.
  • A one button update for failed snapshots.
  • Show coverage information in files being tested. (requires coverage to be collected by your jest config)

Installation

In your vim/neovim, run the command:

:CocInstall coc-inline-jest

Usage

  • TBD

Configuration

  • inlineJest.enabled: Enable or disable the plugin, default is true.
  • inlineJest.pathToJest: Path to Jest binary, default ./node_modules/.bin/jest.
  • inlineJest.pathToConfig: Path to Jest config file, default ./jest.config.js.
  • inlineJest.pathToRoot: Path to project root, default ./.

LICENSE

License what? Just kidding, it's MIT.

coc-jest's People

Contributors

chemzqm avatar ckipp01 avatar dependabot[bot] avatar khanghoang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

coc-jest's Issues

Getting Error when jest config is in package.json

Hi, thanks for the plugin, but I'm getting the following error when I start my editor, I don't have jest.config.js but have the config in package.json,

[coc.nvim] Error on active extension coc-inline-jest: TypeError: Path must be a string. Received null

Plugin doesn't start while in test files. How do I debug?

Hey,

I have a react project and my test file looks something like this filename.test.tsx

The plugin is loaded but not activated when I'm in a test file and I'm not sure how to debug that.

I have jest installed in my project under the default configuration directory

Jest test output has ascii color codes in it.

Hi!

Thanks for the wonderful plugin :)
I've been enjoying using it in my projects but I'm facing this issue now:

image

As you can see the ascii color codes are displayed in the popup and I'm not sure what to do in this situation.

Cheers!

jest executable not found! TypeError [ERR_INVALID_ARG_VALUE]: The argument 'file' cannot be empty. Received ''

Could you please help, I can't get to work :(

"src/todo-app-es6-modules/tests/app.test.js" 141L, 3826C
[coc.nvim] jest executable not found!
[coc.nvim] Error on active extension coc-inline-jest: TypeError [ERR_INVALID_ARG_VALUE]: The argument 'file' cannot be empty. Received ''
[coc.nvim] jest executable not found!
[coc.nvim] Error on active extension coc-inline-jest: TypeError [ERR_INVALID_ARG_VALUE]: The argument 'file' cannot be empty. Received ''
[coc.nvim] jest executable not found!
[coc.nvim] Error on active extension coc-inline-jest: TypeError [ERR_INVALID_ARG_VALUE]: The argument 'file' cannot be empty. Received ''
[coc.nvim] jest executable not found!
[coc.nvim] Error on active extension coc-inline-jest: TypeError [ERR_INVALID_ARG_VALUE]: The argument 'file' cannot be empty. Received ''
[coc.nvim] jest executable not found!
[coc.nvim] Error on active extension coc-inline-jest: TypeError [ERR_INVALID_ARG_VALUE]: The argument 'file' cannot be empty. Received ''
[coc.nvim] jest executable not found!
[coc.nvim] Error on active extension coc-inline-jest: TypeError [ERR_INVALID_ARG_VALUE]: The argument 'file' cannot be empty. Received ''
[coc.nvim] jest executable not found!
[coc.nvim] Error on active extension coc-inline-jest: TypeError [ERR_INVALID_ARG_VALUE]: The argument 'file' cannot be empty. Received ''
[coc.nvim] jest executable not found!
[coc.nvim] Error on active extension coc-inline-jest: TypeError [ERR_INVALID_ARG_VALUE]: The argument 'file' cannot be empty. Received ''
[coc.nvim] jest executable not found!
[coc.nvim] Error on active extension coc-inline-jest: TypeError [ERR_INVALID_ARG_VALUE]: The argument 'file' cannot be empty. Received ''
[coc.nvim] jest executable not found!
[coc.nvim] Error on active extension coc-inline-jest: TypeError [ERR_INVALID_ARG_VALUE]: The argument 'file' cannot be empty. Received ''
[coc.nvim] jest executable not found!
[coc.nvim] Error on active extension coc-inline-jest: TypeError [ERR_INVALID_ARG_VALUE]: The argument 'file' cannot be empty. Received ''
[coc.nvim] jest executable not found!
[coc.nvim] Error on active extension coc-inline-jest: TypeError [ERR_INVALID_ARG_VALUE]: The argument 'file' cannot be empty. Received ''
[coc.nvim] jest executable not found!
[coc.nvim] Error on active extension coc-inline-jest: TypeError [ERR_INVALID_ARG_VALUE]: The argument 'file' cannot be empty. Received ''
[coc.nvim] Installed extension: coc-inline-jest
## Output channel: watchman

How to configure on demand?

Hey,
It might be obvious, but where do I place the inlineJest.enabled configuration? Within coc-settings.json or elsewhere like a variable in my .vimrc?

Particularly, I want to disable this plugin by default and only enable/run it on demand when I want to run tests as it requires so much processing power with my large repository by running all my tests upon opening vim. A bonus would be even being able to disable the immediate run and only use the watch functionality so only relevant tests are run. And if possible, only running the file that was edited would be a nice option too. Let me know if any of that is possible or if simply disabling this plugin by default and enabling it on demand is my best bet. Thanks!

Also good work on this plugin. It seems handy.

Trouble installing coc-inline-jest

I get this when I enable the extension using :CocList -> extensions -> coc-inline-jest 0.1.2

[coc.nvim]Error on active extension coc-inline-jest: TypeError: Cannot read property 'split' of undefined
    at Runner.createProcess [as _createProcess] (webpack-internal:///4:36:38)
    at Runner.start (webpack-internal:///7:122:32)
    at JestProcess.startRunner (webpack-internal:///993:50:21)
    at new JestProcess (webpack-internal:///993:13:14)
    at JestProcessManager.runJest (webpack-internal:///995:30:29)
    at JestProcessManager.run (webpack-internal:///995:40:21)
    at JestProcessManager.startJestProcess (webpack-internal:///995:22:25)
    at VimJest.startProcess (webpack-internal:///985:16:52)
    at Object.exports.createTestLensProvider (webpack-internal:///2:20:13)
    at <anonymous>

And get the following if I do inlineJest.toggle

[coc.nvim]Command: inlineJest.toggle not found

Jest: 23.6.0
Jest package location: <project-root>/node_modules/jest
Neovim: stable 0.4.3
macOS: 10.15.3

Cant get it to work with Gatsby

Firstly, thank you for making this!

I'm having trouble making the plugin work with Gatsby and JS, there's no autocomplete or syntax highlight. It works perfectly when using CRA with JS/TS. What info do you need so we can debug this?
On the left side: Gatsby and JS
On the right side: CRA and TS
Screenshot_2020-04-02_00-40-58

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.