grunt-testem-all
Grunt task for testem.js
Getting Started
This plugin requires Grunt ~0.4.5
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-testem-all --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt;
The "testem" task
Overview
In your project's Gruntfile, add a section named testem
to the data object passed into grunt.initConfig()
.
grunt;
Options
grunt-testem-all
supports all Testem options. See testem configuration reference.
As testem configuration has all necessary options for files serving, you don't need to configure any grunt file mapping — all you need is options
field in your targets.
Running tasks
Tasks can be run with one of the optional flags:
--dev
— run indev
mode (default)--ci
— run inci
mode--server
— run inserver
mode--launchers
— showlaunchers
list
--launchers
Note on It shows launchers based on specific options.
grunt testem --launchers
will show launchers list based on global options, grunt testem:target --launchers
will show launchers list for specific target.
Options priority
Testem config files has higher priority.
Task options does not overrides global options from config file, but adds absent properties.
For example:
// testem.json "framework": "mocha" "launch_in_dev": "Chrome" // Gruntfiletestem: options: launch_in_dev: "FireFox" port: 3333 ...
In result launch_in_dev
property will be ["Chrome"]
, but port
options will be added.
If you have testem config file in root of your project, it will be used as global config, even if you don't provide a path to config in options
Usage Examples
grunt;
Run task
grunt testem:component // run component target in dev mode
grunt testem:anotherComponent --ci // run anotherComponent target in ci mode