mirror of
https://github.com/serratus/quaggaJS.git
synced 2026-08-12 21:21:42 +08:00
change test execution to grunt
This commit is contained in:
+8
-1
@@ -3,6 +3,11 @@ module.exports = function(grunt) {
|
|||||||
// Project configuration.
|
// Project configuration.
|
||||||
grunt.initConfig({
|
grunt.initConfig({
|
||||||
pkg : grunt.file.readJSON('package.json'),
|
pkg : grunt.file.readJSON('package.json'),
|
||||||
|
karma: {
|
||||||
|
unit: {
|
||||||
|
configFile: 'karma.conf.js'
|
||||||
|
}
|
||||||
|
},
|
||||||
uglify : {
|
uglify : {
|
||||||
options : {
|
options : {
|
||||||
banner : '/*! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> */\n'
|
banner : '/*! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> */\n'
|
||||||
@@ -61,7 +66,9 @@ module.exports = function(grunt) {
|
|||||||
grunt.loadNpmTasks('grunt-contrib-jshint');
|
grunt.loadNpmTasks('grunt-contrib-jshint');
|
||||||
|
|
||||||
grunt.loadNpmTasks('grunt-requirejs');
|
grunt.loadNpmTasks('grunt-requirejs');
|
||||||
|
grunt.loadNpmTasks('grunt-karma');
|
||||||
// Default task(s).
|
// Default task(s).
|
||||||
grunt.registerTask('default', ['jshint', 'requirejs', 'uglify']);
|
grunt.registerTask('default', ['jshint', 'requirejs', 'uglify']);
|
||||||
|
grunt.registerTask('test', ['karma']);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -135,8 +135,7 @@ Unit Tests can be run with [Karma][karmaUrl] and written using [Mocha][mochaUrl]
|
|||||||
|
|
||||||
```console
|
```console
|
||||||
> npm install
|
> npm install
|
||||||
> npm install -g karma-cli
|
> grunt test
|
||||||
> npm test
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
"grunt-contrib-jshint": "~0.10.0",
|
"grunt-contrib-jshint": "~0.10.0",
|
||||||
"grunt-contrib-nodeunit": "~0.4.1",
|
"grunt-contrib-nodeunit": "~0.4.1",
|
||||||
"grunt-contrib-uglify": "~0.5.0",
|
"grunt-contrib-uglify": "~0.5.0",
|
||||||
|
"grunt-karma": "^0.9.0",
|
||||||
"grunt-requirejs": "^0.4.2",
|
"grunt-requirejs": "^0.4.2",
|
||||||
"karma": "latest",
|
"karma": "latest",
|
||||||
"karma-chai": "latest",
|
"karma-chai": "latest",
|
||||||
|
|||||||
Reference in New Issue
Block a user