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:
@@ -3,6 +3,11 @@ module.exports = function(grunt) {
|
||||
// Project configuration.
|
||||
grunt.initConfig({
|
||||
pkg : grunt.file.readJSON('package.json'),
|
||||
karma: {
|
||||
unit: {
|
||||
configFile: 'karma.conf.js'
|
||||
}
|
||||
},
|
||||
uglify : {
|
||||
options : {
|
||||
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-requirejs');
|
||||
grunt.loadNpmTasks('grunt-karma');
|
||||
// Default task(s).
|
||||
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
|
||||
> npm install
|
||||
> npm install -g karma-cli
|
||||
> npm test
|
||||
> grunt test
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
"grunt-contrib-jshint": "~0.10.0",
|
||||
"grunt-contrib-nodeunit": "~0.4.1",
|
||||
"grunt-contrib-uglify": "~0.5.0",
|
||||
"grunt-karma": "^0.9.0",
|
||||
"grunt-requirejs": "^0.4.2",
|
||||
"karma": "latest",
|
||||
"karma-chai": "latest",
|
||||
|
||||
Reference in New Issue
Block a user