Serve a mocha runner page with the source and spec script paths configured in your Gruntfile
Serve a mocha runner page with the source and spec script paths configured in your Gruntfile.
This plugin requires Grunt
If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
npm install grunt-mocha-runner --save-dev
In your project's Gruntfile, add a section named
mochaRunner to the data object passed into
gruntinitConfigmochaRunner:all:src: 'src/*.js'spec: 'test/spec/*.js'styles: 'styles/*.css'
The port on which to serve the test runner.
The hostname on which to serve the test runner.
Setting it to
'*' will make the it accessible from anywhere.
'Mocha Spec Runner'
The title of the test runner page.
The mocha ui type to use with