Created
February 13, 2014 17:12
-
-
Save tmlbl/8979385 to your computer and use it in GitHub Desktop.
A Gruntfile for linting and running Mocha tests
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function (grunt) { | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
simplemocha: { | |
options: { | |
timeout: 3000, | |
ignoreLeaks: false, | |
reporter: 'tap' | |
}, | |
all: { src: ['test/**/*.js']} | |
}, | |
jshint: { | |
myFiles: ['card.js', 'test/**/*.js'], | |
options: { | |
"globals" : { | |
/* MOCHA */ | |
"describe" : false, | |
"it" : false, | |
"before" : false, | |
"beforeEach" : false, | |
"after" : false, | |
"afterEach" : false, | |
"require" : false | |
} | |
} | |
} | |
}); | |
grunt.loadNpmTasks('grunt-simple-mocha'); | |
grunt.loadNpmTasks('grunt-contrib-jshint'); | |
grunt.registerTask('default', ['simplemocha', 'jshint']); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment