Skip to content
This repository has been archived by the owner on Sep 7, 2020. It is now read-only.

Commit

Permalink
test(unit): migrate from nodeunit to jasmine (axios#1336)
Browse files Browse the repository at this point in the history
  • Loading branch information
axe312ger authored and zcei committed Apr 25, 2018
1 parent ee6f0b5 commit e4c20ed
Show file tree
Hide file tree
Showing 3 changed files with 405 additions and 423 deletions.
6 changes: 1 addition & 5 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,6 @@ module.exports = function(grunt) {
}
},

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

watch: {
build: {
files: ['lib/**/*.js'],
Expand Down Expand Up @@ -96,7 +92,7 @@ module.exports = function(grunt) {
grunt.file.write('bower.json', JSON.stringify(bower, null, 2));
});

grunt.registerTask('test', 'Run the jasmine and nodeunit tests', ['eslint', 'nodeunit', 'karma:single', 'ts']);
grunt.registerTask('test', 'Run the jasmine and nodeunit tests', ['eslint', 'karma:single', 'ts']);
grunt.registerTask('build', 'Run webpack and bundle the source', ['clean', 'webpack']);
grunt.registerTask('version', 'Sync version info for a release', ['usebanner', 'package2bower']);
};
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
"description": "Promise based HTTP client for the browser and node.js",
"main": "index.js",
"scripts": {
"test": "grunt test && npm run lint && bundlesize",
"pretest": "npm run build",
"test": "npm run test:karma && npm run test:unit && npm run lint & bundlesize",
"test:karma": "grunt test",
"test:unit": "jasmine test/unit/**/*.js",
"start": "node ./sandbox/server.js",
"clean": "rimraf dist",
"cjs": "babel lib --out-dir dist/commonjs",
Expand Down Expand Up @@ -63,7 +66,7 @@
"grunt-ts": "^6.0.0-beta.19",
"grunt-webpack": "^1.0.18",
"istanbul-instrumenter-loader": "^1.0.0",
"jasmine-core": "^2.4.1",
"jasmine": "^2.9.0",
"karma": "^1.3.0",
"karma-chrome-launcher": "^2.2.0",
"karma-coverage": "^1.1.1",
Expand All @@ -78,6 +81,7 @@
"karma-webpack": "^1.7.0",
"load-grunt-tasks": "^3.5.2",
"minimist": "^1.2.0",
"nock": "^9.1.6",
"rimraf": "^2.6.2",
"sinon": "^4.5.0",
"typescript": "^2.8.1",
Expand Down

0 comments on commit e4c20ed

Please sign in to comment.