Gruntfile.js 773 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. /**
  2. * Created by ETiV on 4/27/14.
  3. */
  4. module.exports = function (grunt) {
  5. 'use strict';
  6. //noinspection JSUnresolvedFunction
  7. grunt.initConfig({
  8. mochaTest: {
  9. test: {
  10. options: {
  11. mocha: require('mocha'),
  12. require: 'should',
  13. timeout: 60000,
  14. slow: 2000,
  15. clearRequireCache: true,
  16. reporter: 'spec'
  17. },
  18. src: ['test/**/*.js']
  19. }
  20. },
  21. watch: {
  22. test: {
  23. options: {
  24. spawn: false
  25. },
  26. files: 'test/**/*.js',
  27. tasks: ['test']
  28. }
  29. }
  30. });
  31. grunt.loadNpmTasks('grunt-mocha-test');
  32. grunt.loadNpmTasks('grunt-contrib-watch');
  33. // grunt.registerTask('watch', ['watch']);
  34. grunt.registerTask('test', ['mochaTest:test']);
  35. };