Skip to content

Commit 2c7f745

Browse files
Add mocha task for grunt
1 parent 93174cf commit 2c7f745

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

Gruntfile.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,15 @@ var fs = require("fs"),
1212

1313
module.exports = function(grunt) {
1414
grunt.initConfig({
15+
mochaTest: {
16+
test: {
17+
options: {
18+
style: 'bdd',
19+
reporter: 'spec'
20+
},
21+
src: ['test/unit/*.js']
22+
}
23+
},
1524
pkg: grunt.file.readJSON('package.json'),
1625
uglify: {
1726
options: {
@@ -42,6 +51,8 @@ module.exports = function(grunt) {
4251
done();
4352
});
4453
});
54+
grunt.registerTask('test', 'mochaTest');
4555

56+
grunt.loadNpmTasks('grunt-mocha-test');
4657
grunt.loadNpmTasks('grunt-contrib-uglify');
4758
};

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"canvas": ">=0.10.0",
1818
"grunt": "~0.4.3",
1919
"grunt-contrib-uglify": "~0.2.0",
20+
"grunt-mocha-test": "~0.11.0",
2021
"browserify": "~3.32.0"
2122
},
2223
"keywords": ["neural network", "classifier", "machine learning"]

0 commit comments

Comments
 (0)