Create unit testing files for QUnit and Nodeunit with one managed test.
npm install grunt-createunit


> Create Unit-test files with base tests for QUnit and Nodeunit ...
~1.*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:
``shell`
npm install grunt-createunit --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
`js`
grunt.loadNpmTasks('grunt-createunit');
This plugin was designed to work with Grunt 0.4.x. If you're still using grunt v0.3.x it's strongly recommended that you upgrade, but in case you can't please use v0.3.2.
command._Task targets, files and options may be specified according to the grunt Configuring tasks guide.
$3
#### destination
Type:
StringPath for write test files
#### template
Type:
String Template fiele for executing unit tests
#### run_sufix
Type:
String
Default: '_run.js' #### test_sufix
Type:
String
Default: '_test.js' $3
`js
createunit: {
nodeunit: {
options: {
destination: 'test_nodeunit',
template: 'test_/template/nodeunit.tpl',
// run_sufix: '_run.js',
// test_sufix: '_test.js'
},
src: 'test_/*_test.js'
},
qunit: {
options: {
destination: 'test_qunit',
template: 'test_/template/qunit.tpl',
run_sufix: '_run.html',
// test_sufix: '_test.js'
},
src: 'test_/*_test.js'
}
}
``> Find more project examples:
> * OpenCrisp BaseJS Gruntfile.js
> * OpenCrisp CreateJS Gruntfile.js
> * OpenCrisp EventJS Gruntfile.js
> * OpenCrisp PathJS Gruntfile.js
Task submitted by Fabian Schmid