Skip to content

Instantly share code, notes, and snippets.

@Gattermeier
Created August 7, 2015 20:54
Show Gist options
  • Save Gattermeier/2da43b6ceeb60610336a to your computer and use it in GitHub Desktop.
Save Gattermeier/2da43b6ceeb60610336a to your computer and use it in GitHub Desktop.
If you use grunt, you can use the grunt-contrib-watch plugin to watch for file changes and run your tests automagically. Your Gruntfile.js should look something like this.
module.exports = function(grunt) {
grunt.initConfig({
jshint: {
files: [],
},
watch: {
files: ['src/**/*.js'],
tasks: ['jshint']
}
});
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.registerTask('default', ['watch']);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment