Skip to content

Commit

Permalink
test(unit): migrate from nodeunit to jasmine (#1336)
Browse files Browse the repository at this point in the history
  • Loading branch information
axe312ger authored and Khaledgarbaya committed Feb 9, 2018
1 parent 30e281d commit d1101f4
Show file tree
Hide file tree
Showing 3 changed files with 404 additions and 419 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']);
};
9 changes: 6 additions & 3 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 @@ -55,14 +58,13 @@
"grunt-banner": "^0.6.0",
"grunt-cli": "^1.2.0",
"grunt-contrib-clean": "^1.0.0",
"grunt-contrib-nodeunit": "^1.0.0",
"grunt-contrib-watch": "^1.0.0",
"grunt-eslint": "^19.0.0",
"grunt-karma": "^2.0.0",
"grunt-ts": "^6.0.0-beta.3",
"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.0.0",
"karma-coverage": "^1.0.0",
Expand All @@ -77,6 +79,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": "^1.17.4",
"url-search-params": "^0.6.1",
Expand Down

0 comments on commit d1101f4

Please sign in to comment.