Skip to content

Commit

Permalink
test: use mocha instead of nodeunit (axios#1655)
Browse files Browse the repository at this point in the history
  • Loading branch information
JustinBeckwith authored Jul 6, 2018
1 parent 0c4bf3c commit 9808038
Show file tree
Hide file tree
Showing 4 changed files with 197 additions and 188 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Please update the docs accordingly so that there are no discrepencies between th

### Developing

- `grunt test` run the jasmine and nodeunit tests
- `grunt test` run the jasmine and mocha tests
- `grunt build` run webpack and bundle the source
- `grunt version` prepare the code for release
- `grunt watch:test` watch for changes and run `test`
Expand Down
11 changes: 8 additions & 3 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,13 @@ module.exports = function(grunt) {
}
},

nodeunit: {
all: ['test/unit/**/*.js']
mochaTest: {
test: {
src: ['test/unit/**/*.js']
},
options: {
timeout: 30000,
},
},

watch: {
Expand Down Expand Up @@ -96,7 +101,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 mocha tests', ['eslint', 'mochaTest', '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']);
};
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@
"grunt-banner": "^0.6.0",
"grunt-cli": "^1.2.0",
"grunt-contrib-clean": "^1.1.0",
"grunt-contrib-nodeunit": "^1.0.0",
"grunt-contrib-watch": "^1.0.0",
"grunt-eslint": "^20.1.0",
"grunt-karma": "^2.0.0",
"grunt-mocha-test": "^0.13.3",
"grunt-ts": "^6.0.0-beta.19",
"grunt-webpack": "^1.0.18",
"istanbul-instrumenter-loader": "^1.0.0",
Expand All @@ -61,11 +61,12 @@
"karma-webpack": "^1.7.0",
"load-grunt-tasks": "^3.5.2",
"minimist": "^1.2.0",
"mocha": "^5.2.0",
"sinon": "^4.5.0",
"webpack": "^1.13.1",
"webpack-dev-server": "^1.14.1",
"typescript": "^2.8.1",
"url-search-params": "^0.10.0",
"typescript": "^2.8.1"
"webpack": "^1.13.1",
"webpack-dev-server": "^1.14.1"
},
"browser": {
"./lib/adapters/http.js": "./lib/adapters/xhr.js"
Expand Down
Loading

0 comments on commit 9808038

Please sign in to comment.