vim-qunit-special-blend


Ⅰ. 插件描述

A Vim plugin that uses the qunit-special-blend npm module to allow the user to run single qunit tests from a test suite.

Ⅱ. 基本信息

创建日期:  2014-02-01
使用用户:  5
Github星:  11
插件作者:  Jarrod

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'jarrodctaylor/vim-qunit-special-blend'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'jarrodctaylor/vim-qunit-special-blend'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'jarrodctaylor/vim-qunit-special-blend'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/jarrodctaylor/vim-qunit-special-blend

Ⅳ. 文档说明

# vim-qunit-special-blend

Ever want to run a single qunit test from your test suite with karma?
Yeah, so did I.

This plugin was created to leverage the functionality provided by the
karma-quint-special-blend npm package to run QUnit tests from within Vim. With this
plugin you will be able to run all of your tests, a single test module, and
even an individual test.

The Plugin In Action

JavaScript: Notice how there are 3 tests and we only run one of them.
javascript

CoffeeScript: Here we only run the first module which has two tests.
coffee

Installation

Use your plugin manager of choice.

  • Pathogen

    • git clone https://github.com/JarrodCTaylor/vim-qunit-special-blend ~/.vim/bundle/vim-qunit-special-blend
  • Vundle

    • Add Bundle 'https://github.com/JarrodCTaylor/vim-qunit-special-blend' to .vimrc
    • Run :BundleInstall
  • NeoBundle

    • Add NeoBundle 'https://github.com/JarrodCTaylor/vim-qunit-special-blend' to .vimrc
    • Run :NeoBundleInstall
  • vim-plug

    • Add Plug 'https://github.com/JarrodCTaylor/vim-qunit-special-blend' to .vimrc
    • Run :PlugInstall

Requirements

This plugin assumes that you are running your JavaScript tests with karma.
You will need to npm install karma-qunit-special-blend. Then in your projects karma.conf.js
have the frameworks array configured as follows:

  frameworks: ['qunit', 'qunit-sb'],

Usage

The plugin provides four commands:

  RunAllQunitTests
  RunSingleQunitModule
  RunSingleQunitTest
  RunSingleAsyncQunitTest

Ensure that your cursor is within a module or test as appropriate for the
desired command that you are trying to run.

Custom Settings

The plugin assumes that your JS tests are configured to be run with `grunt
test` from the command line. If this is not the case you can specify the
command that will run your tests with the special_blend_run variable in your
.vimrc like so:

let g:special_blend_run='karma start'

添加新评论