Skip to content

Commit

Permalink
Adding nodeunit
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Zabriskie committed Aug 27, 2014
1 parent 85e9330 commit 0d0b837
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
8 changes: 6 additions & 2 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ module.exports = function(grunt) {
}
},

nodeunit: {
all: ['test/unit/*.js']
},

webpack: generateWebpackConfig(),

watch: {
Expand All @@ -41,13 +45,13 @@ module.exports = function(grunt) {
tasks: ['build']
},
test: {
files: ['lib/**/*.js', 'specs/**/*.js'],
files: ['lib/**/*.js', 'test/**/*.js'],
tasks: ['test']
}
}
});

grunt.registerTask('test', ['webpack:global', 'karma:single']);
grunt.registerTask('test', ['webpack:global', 'nodeunit', 'karma:single']);
grunt.registerTask('build', ['webpack']);
grunt.registerTask('publish', ['clean', 'test', 'build', 'update_json']);

Expand Down
2 changes: 1 addition & 1 deletion karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ module.exports = function(config) {
// list of files / patterns to load in the browser
files: [
'dist/axios.js',
'specs/axios.spec.js'
'test/specs/axios.spec.js'
],


Expand Down
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"description": "Lightweight Promise based XHR library",
"main": "index.js",
"scripts": {
"test": "grunt test"
"test": "grunt test",
"start": "node ./sandbox/index.js"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -38,6 +39,7 @@
"grunt-karma": "^0.8.3",
"karma-phantomjs-launcher": "^0.1.4",
"karma-jasmine-ajax": "^0.1.4",
"grunt-update-json": "^0.1.3"
"grunt-update-json": "^0.1.3",
"grunt-contrib-nodeunit": "^0.4.1"
}
}
File renamed without changes.

0 comments on commit 0d0b837

Please sign in to comment.