mirror of
https://github.com/tenrok/axios.git
synced 2026-06-20 20:00:40 +03:00
Adding nodeunit
This commit is contained in:
+6
-2
@@ -33,6 +33,10 @@ module.exports = function(grunt) {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
nodeunit: {
|
||||||
|
all: ['test/unit/*.js']
|
||||||
|
},
|
||||||
|
|
||||||
webpack: generateWebpackConfig(),
|
webpack: generateWebpackConfig(),
|
||||||
|
|
||||||
watch: {
|
watch: {
|
||||||
@@ -41,13 +45,13 @@ module.exports = function(grunt) {
|
|||||||
tasks: ['build']
|
tasks: ['build']
|
||||||
},
|
},
|
||||||
test: {
|
test: {
|
||||||
files: ['lib/**/*.js', 'specs/**/*.js'],
|
files: ['lib/**/*.js', 'test/**/*.js'],
|
||||||
tasks: ['test']
|
tasks: ['test']
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
grunt.registerTask('test', ['webpack:global', 'karma:single']);
|
grunt.registerTask('test', ['webpack:global', 'nodeunit', 'karma:single']);
|
||||||
grunt.registerTask('build', ['webpack']);
|
grunt.registerTask('build', ['webpack']);
|
||||||
grunt.registerTask('publish', ['clean', 'test', 'build', 'update_json']);
|
grunt.registerTask('publish', ['clean', 'test', 'build', 'update_json']);
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -16,7 +16,7 @@ module.exports = function(config) {
|
|||||||
// list of files / patterns to load in the browser
|
// list of files / patterns to load in the browser
|
||||||
files: [
|
files: [
|
||||||
'dist/axios.js',
|
'dist/axios.js',
|
||||||
'specs/axios.spec.js'
|
'test/specs/axios.spec.js'
|
||||||
],
|
],
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+4
-2
@@ -4,7 +4,8 @@
|
|||||||
"description": "Lightweight Promise based XHR library",
|
"description": "Lightweight Promise based XHR library",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "grunt test"
|
"test": "grunt test",
|
||||||
|
"start": "node ./sandbox/index.js"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
@@ -38,6 +39,7 @@
|
|||||||
"grunt-karma": "^0.8.3",
|
"grunt-karma": "^0.8.3",
|
||||||
"karma-phantomjs-launcher": "^0.1.4",
|
"karma-phantomjs-launcher": "^0.1.4",
|
||||||
"karma-jasmine-ajax": "^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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user