Skip to content

evanlucas/verde

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

verde

Run multiple files through mocha.

But mocha already runs multiple files? Yes, this runs the files one by one.

Sometimes it just is easier to do it this way

Install

$ npm install --save-dev verde

Usage (CLI)

$ verde [options]

API

verde(opts:Object)

opts can have the following keys:

  • reporter {String} the mocha reporter (defaults to list)
  • color {Boolean} whether to use colors (defaults to true)
  • require {Array} require additional modules (defaults to [])
  • dir {String} the directory to read (defaults to process.cwd())
  • files {Array} the files to run (defaults to all .js files in opts.dir)
  • addons {Array} additional options to pass to mocha
  • recursive {Boolean} recursively walk directories to run tests (default false)

verde.run()

Begins running the files through mocha

Events

test:start

Emitted when the file is passed to mocha

  • filename the file being run

test:error

Emitted on test failure

  • err
  • filename
  • stdout/stderr

test:finish

Emitted when the test succeeds

  • filename
  • stdout/stderr

done

Emitted when all files have been run through mocha

License

MIT

Contributors

Author: [https://github.com/evanlucas](Evan Lucas)

About

Run multiple files with mocha

Resources

Stars

Watchers

Forks

Packages

No packages published