• Stars
    star
    171
  • Rank 215,032 (Top 5 %)
  • Language
    Lua
  • License
    MIT License
  • Created over 2 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A Neovim wrapper for running tests

nvim-test 1.4.1

Test Runner for neovim

tests Awesome Neovim

Features

Language Test Runners
C Sharp dotnet test
Go go-test
Haskell hspec, stack
Javascript jest, mocha
Lua busted, vusted
Python pytest, pyunit
Ruby rspec
Rust cargo-test
Typescript jest, mocha, ts-mocha

Install

with packer:

use {
  "klen/nvim-test",
  config = function()
    require('nvim-test').setup()
  end
}

Commands

The plugin defines the commands:

  • TestSuite - run the whole test suite
  • TestFile - run all tests for the current file
  • TestEdit - edit tests for the current file
  • TestNearest - run the test nearest to the cursor
  • TestLast - rerun the latest test
  • TestVisit - open the last run test in the current buffer
  • TestInfo - show an information about the plugin

Setup

This plugin must be explicitly enabled by using require("nvim-test").setup{}

Default options:

require('nvim-test').setup {
  run = true,                 -- run tests (using for debug)
  commands_create = true,     -- create commands (TestFile, TestLast, ...)
  filename_modifier = ":.",   -- modify filenames before tests run(:h filename-modifiers)
  silent = false,             -- less notifications
  term = "terminal",          -- a terminal to run ("terminal"|"toggleterm")
  termOpts = {
    direction = "vertical",   -- terminal's direction ("horizontal"|"vertical"|"float")
    width = 96,               -- terminal's width (for vertical|float)
    height = 24,              -- terminal's height (for horizontal|float)
    go_back = false,          -- return focus to original window after executing
    stopinsert = "auto",      -- exit from insert mode (true|false|"auto")
    keep_one = true,          -- keep only one terminal for testing
  },
  runners = {               -- setup tests runners
    cs = "nvim-test.runners.dotnet",
    go = "nvim-test.runners.go-test",
    haskell = "nvim-test.runners.hspec",
    javascriptreact = "nvim-test.runners.jest",
    javascript = "nvim-test.runners.jest",
    lua = "nvim-test.runners.busted",
    python = "nvim-test.runners.pytest",
    ruby = "nvim-test.runners.rspec",
    rust = "nvim-test.runners.cargo-test",
    typescript = "nvim-test.runners.jest",
    typescriptreact = "nvim-test.runners.jest",
  }
}

Setup a runner:

  require('nvim-test.runners.jest'):setup {
    command = "~/node_modules/.bin/jest",                                       -- a command to run the test runner
    args = { "--collectCoverage=false" },                                       -- default arguments
    env = { CUSTOM_VAR = 'value' },                                             -- custom environment variables

    file_pattern = "\\v(__tests__/.*|(spec|test))\\.(js|jsx|coffee|ts|tsx)$",   -- determine whether a file is a testfile
    find_files = { "{name}.test.{ext}", "{name}.spec.{ext}" },                  -- find testfile for a file

    filename_modifier = nil,                                                    -- modify filename before tests run (:h filename-modifiers)
    working_directory = nil,                                                    -- set working directory (cwd by default)
  }

More Repositories

1

pylama

Code audit tool for python.
Python
1,038
star
2

mixer

Mixer -- Is a fixtures replacement. Supported Django, Flask, SqlAlchemy and custom python objects.
Python
928
star
3

py-frameworks-bench

Another benchmark for some python frameworks
Python
705
star
4

muffin

Muffin is a fast, simple and asyncronous web-framework for Python 3
Python
666
star
5

graphite-beacon

Simple alerting system for Graphite metrics
Python
453
star
6

django_markdown

Django markdown support and wysiwig
JavaScript
390
star
7

peewee_migrate

Simple migration engine for Peewee
Python
339
star
8

Flask-Foundation

Quick start with Flask
Python
153
star
9

aioauth-client

OAuth client for aiohttp
Python
140
star
10

nvim-config-local

Secure load local config files for neovim
Lua
131
star
11

atmark

Awk+Sed for humans
Python
69
star
12

python-scss

Python scss parser.
Python
68
star
13

dealer

Make some staff
Python
62
star
14

marshmallow-peewee

Peewee ORM integration with the marshmallow (de)serialization library.
Python
58
star
15

zeta-library

Css, scss, js parser and linker. Also framework for working with static files
Python
52
star
16

Flask-Collect

Collect static files in flask application
Python
46
star
17

makesite

makesite is a collection of scripts for deploying and managing web projects
Python
46
star
18

flask-pw

Peewee ORM integration for Flask framework
Python
45
star
19

peewee-aio

Async support for Peewee ORM
Python
43
star
20

adrest

Another django rest framework
Python
42
star
21

.vim

my vim settings
Vim Script
40
star
22

django-netauth

django auth backend
Python
36
star
23

asgi-tools

Tools to build ASGI apps
Python
33
star
24

pomodoro-tracker-locales

Language files
24
star
25

asgi-babel

Adds internationalization (i18n) support to ASGI applications (Asyncio/Trio)
Python
24
star
26

http-router

A simple router for HTTP applications
Python
22
star
27

rope-vim

Pathogen compatable ropevim plugin. Dont need install rope libs in system.
Python
21
star
28

bottle-peewee

Integrate Peewee ORM to Bottle framework
Python
19
star
29

muffin-admin

Admin interface for Muffin Framework
Python
17
star
30

unite-radio.vim

Play radio stations in your VIM
Vim Script
15
star
31

mahjong.horneds.com

Riichi Mahjong Scores Trainer
CoffeeScript
15
star
32

flask-restler

Yet another REST library for Flask
Python
14
star
33

django-gitrevision

Django git revision, simple add current git revision to request object for use in tempaltes and views.
Python
14
star
34

aio-databases

Async Support for various databases
Python
13
star
35

klen.github.io

My github powered site.
HTML
12
star
36

imgproxy

Python support for ImgProxy image processing server (https://imgproxy.net)
Python
12
star
37

aio-peewee

Tools to make Peewee work when using Asyncio
Python
11
star
38

muffin-jinja2

Jinja2 templates for Muffin framework
Python
11
star
39

muffin-rest

REST helpers for Muffin Framework
Python
11
star
40

pytest-aio

Is a simple pytest plugin for testing async python code
Python
10
star
41

donald

Make asyncio great again
Python
10
star
42

bottle-login

Implement users' sessions in Bottle framework
Python
9
star
43

muffin-peewee

Peewee integration to Muffin framework
Python
9
star
44

pypika-orm

Async ORM based on PyPika
Python
8
star
45

asgi-prometheus

Support Prometheus metrics for ASGI applications
Python
8
star
46

asgi-sessions

Signed Cookie-Based HTTP sessions for ASGI applications
Python
8
star
47

muffin-session

Session for Muffin Framework
Python
7
star
48

muffin-mongo

MongoDB support for Muffin framework
Python
7
star
49

starter

Create the skeleton for new projects.
Python
6
star
50

muffin-redis

Redis support for Muffin framework
Python
6
star
51

dotfiles

kk .dotfiles / use it for your own risks
Shell
5
star
52

muffin-sentry

Sentry integration to Muffin Framework.
Python
5
star
53

muffin-example

Example Muffin application
Python
5
star
54

bottle-jade

Provide Jade templates for Bottle framework
Python
4
star
55

django-gishelper

Useful commands for geodjango
Python
4
star
56

muffin-oauth

OAuth1/2 support for Muffin framework.
Python
4
star
57

pyserve

Serve local dirs (human version)
Python
4
star
58

knocker

A self contained service to make HTTP calls
Python
4
star
59

muffin-debugtoolbar

Debug Toolbar for Muffin applications
JavaScript
4
star
60

muffin-babel

Extension to Muffin that adds localization support with help of babel.
Python
3
star
61

inirama

Simple INI parser
Python
3
star
62

pylama_pylint

Pylint support for pylama.
Makefile
3
star
63

starlette-plugins

Create Starlette Plugins easier
Python
3
star
64

example_tornadio_project

Sources for http://klen.github.com/tornadio_socket-io-ru.html
Python
3
star
65

muffin-databases

Async support for a range of databases for Muffin Framework
Python
3
star
66

muffin-peewee-aio

Peewee integration to Muffin framework with async support
Python
2
star
67

redux-axios-reducers

Redux Reducers for Axios
CoffeeScript
2
star
68

bottle-manage

Script manager for bottle framework.
Python
2
star
69

pytest-redislite

Pytest plugin for testing code using Redi
Python
2
star
70

muffin-grpc

GRPC Support for Muffin Framework
Python
2
star
71

fquest

ZeroQuest lazy RPG. Moscow Facebook Hackday.
Python
2
star
72

aio-apiclient

Simple Asyncio Client for any HTTP APIs
Python
2
star
73

muffin-jade

Jade templates for Muffin Framework
Python
2
star
74

signalbus

Simple and small library to broadcast signals with typing support
Python
2
star
75

muffin-metrics

Send application metrics to Graphite
Python
2
star
76

hvim

Haskell mode for vim
Vim Script
2
star
77

hydrogenjs

Simple MVC system for atomjs
JavaScript
1
star
78

filler

Simple game on javascript and canvas.
JavaScript
1
star
79

simpletree

Fastest and simplest tree implementations for Django
Python
1
star
80

modconfig

Simple hierarchic configuration manager for apps
Python
1
star
81

sailplay

Python client for API sailplay.ru
Python
1
star
82

zeta-libs

Frameworks repo for zetalibrary
JavaScript
1
star
83

redux-code

Yet another creators library
TypeScript
1
star
84

Flask-jsonrpc-example

Some flask experements
Python
1
star
85

tweetchi

Python
1
star
86

muffin-prometheus

Prometheus metrics exporter for Muffin framework
Python
1
star
87

starlette-views

A helper to make views faster with Starlette
Python
1
star