gruntfile.js 971 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. 'use strict';
  2. module.exports = function(grunt) {
  3. grunt.loadNpmTasks('grunt-mocha-test');
  4. grunt.loadNpmTasks('grunt-contrib-clean');
  5. grunt.loadNpmTasks('grunt-contrib-jshint');
  6. var src = ['test/manager/taskManager.js', 'test/filters/*.js',
  7. 'test/remote/*.js', 'test/service/*.js', 'test/modules/*.js', 'test/util/*.js', 'test/*.js'];
  8. // Project configuration.
  9. grunt.initConfig({
  10. mochaTest: {
  11. test: {
  12. options: {
  13. reporter: 'spec',
  14. timeout: 5000,
  15. require: 'coverage/blanket'
  16. },
  17. src: src
  18. },
  19. coverage: {
  20. options: {
  21. reporter: 'html-cov',
  22. quiet: true,
  23. captureFile: 'coverage.html'
  24. },
  25. src: src
  26. }
  27. },
  28. clean: {
  29. "coverage.html" : {
  30. src: ['coverage.html']
  31. }
  32. },
  33. jshint: {
  34. all: ['lib/*']
  35. }
  36. });
  37. // Default task.
  38. grunt.registerTask('default', ['clean', 'mochaTest', 'jshint']);
  39. };