# jest-vim-reporter

> Reporter that makes jest results easier to work with for Vim's quickfix and vim-test plugin

Latest version **0.0.1** (published 2018-11-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install jest-vim-reporter
pnpm add jest-vim-reporter
yarn add jest-vim-reporter
bun add jest-vim-reporter
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2018-11-04 |
| First published | 2018-11-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 672.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Oli Lalonde |
| Maintainers | olalonde |
| Keywords | jest, reporter, vim, vim-test |

## Links

- npm: https://www.npmjs.com/package/jest-vim-reporter
- npm.io page: https://npm.io/package/jest-vim-reporter

## Alternatives

- [duck](https://npm.io/package/duck.md) — 4.2M weekly downloads
- [ava](https://npm.io/package/ava.md) — 560.2K weekly downloads
- [storybook-addon-module-mock](https://npm.io/package/storybook-addon-module-mock.md) — 71.7K weekly downloads
- [@ethereum-waffle/mock-contract](https://npm.io/package/@ethereum-waffle/mock-contract.md) — 40.0K weekly downloads
- [aws-elasticsearch-connector](https://npm.io/package/aws-elasticsearch-connector.md) — 37.4K weekly downloads

## Recent versions

- 0.0.1 (latest) — 2018-11-04

## README

# Jest reporter for Vim's QuickFix

![vim-test jest demo](./vim-test-jest-demo.gif)

A [reporter](https://facebook.github.io/jest/docs/en/configuration.html#reporters-array-modulename-modulename-options)
for the [`jest`](https://facebook.github.io/jest/) testing framework that cleans
strips down most of the output for use with make or [vim-test](https://github.com/janko-m/vim-test)
and the quickfix window.

The output is compatible with Vim's default errorformat.

## Usage

```
yarn add --dev jest-vim-reporter
```

## With [vim-test](https://github.com/janko-m/vim-test) (recommended)

In your `.vimrc`:

```viml
let g:test#javascript#jest#options = '--reporters jest-vim-reporter'
```

(optional) Here's my full configuration using [vim-plug](https://github.com/junegunn/vim-plug). I tested a bunch of strategies and the one that seems to work best with neovim is Neomake.

```viml
Plug 'janko-m/vim-test' " run test from vim
Plug 'neomake/neomake' " runs make asynchronously in background

let g:test#javascript#jest#options = '--reporters jest-vim-reporter'
let g:test#strategy = 'neomake'
```

## With make

```viml
set makeprg=./node_modules/.bin/jest\ --reporters\ jest-vim-reporter
```


If you don't want to install a dependency, just clone this repo or copy the
`index.js` file and use an absolute path to it as the reporter.


## Development

Here's a development setup for testing this plugin:

```sh
yarn install
```

Create `test.out`

```sh
./node_modules/.bin/jest --reporters ./index.test.js > test.out
```

In your `.vimrc`:

```viml
" fake make prog so it's faster to get to quickfix window
set makeprg=cat\ test.out
" auto open quickfix window on make
autocmd QuickFixCmdPost [^l]* nested cwindow
autocmd QuickFixCmdPost    l* nested lwindow
```

Run:

```sh
vim -c ":make"
```

## LICENSE

[MIT](https://opensource.org/licenses/MIT)

---
_Source: https://npm.io/package/jest-vim-reporter · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
