Noisy Pneumatic Mnemonic
    Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    vimspecpublic

    VimSpec

    Build Status

    Vim spec/test framework.

    Currently, the only supported assertion is "AssertEquals" but I'm planning to add more in the future.

    Installation

    npm install -g vimspec

    Example usage

    In your plugin, create a test directory with files that end with '_test.vim' or '_spec.vim'.

    A spec file looks like this:

    source test/fixtures/file.vim
     
    function! TestAdd()
      call Describe("Add(1,2)")
      call AssertEquals(Add(1,2), 3)
    endfunc
     
    function! TestSubtract()
      call Describe("Subtract(1,2)")
      call AssertEquals(Subtract(1,2), -1) 
    endfunc

    Within the plugin's root directory run "vimspec", you will see this output (with colors):

    test/fixtures/file_spec.vim
      #TestAdd:
        Add(1,2)
          ✓ equals 3
      #TestSubtract:
        Subtract(1,2)
          ☓ expected '2' to equal '-1'
     

    Keywords

    none

    install

    npm i vimspec

    Downloadsweekly downloads

    3

    version

    0.0.3

    license

    none

    repository

    github.com

    last publish

    collaborators

    • avatar