Skip to content

Commit

Permalink
using jasmine-node instead of nodeunit
Browse files Browse the repository at this point in the history
  • Loading branch information
cesine committed Apr 13, 2014
1 parent aad047a commit 3be6dfc
Show file tree
Hide file tree
Showing 4 changed files with 2,394 additions and 7 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Expand Up @@ -17,7 +17,8 @@ coverage
.grunt

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release
build
dist

# Dependency directory
# Deployed apps should consider commenting this line out:
Expand Down
26 changes: 20 additions & 6 deletions Gruntfile.js
Expand Up @@ -31,8 +31,19 @@ module.exports = function(grunt) {
dest: 'dist/<%= pkg.name %>.min.js'
},
},
nodeunit: {
files: ['test/**/*_test.js']
jasmine_node: {
specNameMatcher: 'spec',
projectRoot: './',
requirejs: false,
forceExit: false,
isVerbose: true,
showColors: true,
jUnit: {
report: true,
savePath: './build/reports/jasmine/',
consolidate: true,
useDotNotation: false
}
},
jshint: {
options: {
Expand All @@ -48,6 +59,9 @@ module.exports = function(grunt) {
src: ['lib/**/*.js']
},
test: {
options: {
jshintrc: 'test/.jshintrc'
},
src: ['test/**/*.js']
},
},
Expand All @@ -58,23 +72,23 @@ module.exports = function(grunt) {
},
lib: {
files: '<%= jshint.lib.src %>',
tasks: ['jshint:lib', 'nodeunit']
tasks: ['jshint:lib', 'jasmine_node']
},
test: {
files: '<%= jshint.test.src %>',
tasks: ['jshint:test', 'nodeunit']
tasks: ['jshint:test', 'jasmine_node']
},
},
});

// These plugins provide necessary tasks.
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-nodeunit');
grunt.loadNpmTasks('grunt-jasmine-node');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-watch');

// Default task.
grunt.registerTask('default', ['jshint', 'nodeunit', 'concat', 'uglify']);
grunt.registerTask('default', ['jshint', 'jasmine_node', 'concat', 'uglify']);

};

0 comments on commit 3be6dfc

Please sign in to comment.