0.0.3 • Published 10 years ago

generator-mocha-test v0.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
10 years ago

generator-mocha-test Build Status

Yeoman generator for Mocha with live reloading using the Chai assertion library

Getting Started

Install Yeoman

Yeoman helps you to kickstart new projects, prescribing best practices and tools to help you stay productive.

The Yeoman workflow comprises three types of tools for improving your productivity and satisfaction when building a web app: the scaffolding tool (yo), the build tool (Grunt, Gulp, etc) and the package manager (like Bower and npm).

npm install -g yo

Yeoman Generators

Yeoman provides a generator ecosystem. A generator is basically a plugin that can be run with the yo command to scaffold complete projects or useful parts.

To install generator-mocha-test from npm, run:

npm install -g generator-mocha-test

Finally, initiate the generator:

yo mocha-test

Using mocha-test

Initial Set Up

Initiating the generator will create a test folder with SpecRunner.html and src and spec subfolders. The code you want to test will go into the src subfolder and the mocha tests you write will go into the spec subfolder.

SpecRunner

SpecRunner runs in the browser and will display the result of running your mocha tests.

To launch SpecRunner run:

grunt test

Live Reload

Using the grunt test command to serve the SpecRunner will cause the SpecRunner page to refresh anytime you make changes to your JavaScript files. Additionally, any new files you create will automaticlly be added to the SpecRunner.

Caveat: the files must be in the src or spec folder.

License

MIT

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago

0.0.0

10 years ago