Skip to content

Instantly share code, notes, and snippets.

@tmlbl
Created February 13, 2014 17:12
Show Gist options
  • Save tmlbl/8979385 to your computer and use it in GitHub Desktop.
Save tmlbl/8979385 to your computer and use it in GitHub Desktop.
A Gruntfile for linting and running Mocha tests
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