Skip to content

Commit

Permalink
Merge pull request #849 from marmelab/direct_karma
Browse files Browse the repository at this point in the history
[RFR] Use Karma directly (not through grunt)
  • Loading branch information
fzaninotto committed Dec 10, 2015
2 parents a0e71df + c71103e commit 5ec6efd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 29 deletions.
11 changes: 0 additions & 11 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,6 @@ module.exports = function (grunt) {
}
}
},
karma: {
unit: {
configFile: 'src/javascripts/test/karma.conf.js',
singleRun: process.env.KARMA_SINGLE_RUN !== 'false'
}
},
protractor: {
e2e: {
configFile: 'src/javascripts/test/protractor.conf.js',
Expand All @@ -68,13 +62,8 @@ module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-exec');
grunt.loadNpmTasks('grunt-protractor-runner');
grunt.loadNpmTasks('grunt-karma');
grunt.loadNpmTasks('grunt-mocha-test');

grunt.registerTask('test', ['karma', 'test:e2e']);
grunt.registerTask('test:e2e', ['test:e2e:prepare', 'connect:test', 'protractor']);
grunt.registerTask('test:e2e:prepare', ['exec:webpack', 'copy:test_sample_app', 'copy:test_build', 'copy:test_fakerest', 'copy:test_sinon_server']);

grunt.registerTask('test:local', ['karma', 'test:local:e2e']);
grunt.registerTask('test:local:e2e', ['test:e2e:prepare', 'connect:test', 'protractor']);
};
9 changes: 4 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,10 @@ build:
@cp -Rf build examples/blog/
@echo "Files build/ng-admin.min.css and build/ng-admin.min.js updated (with minification)"

test:
@./node_modules/.bin/grunt test:local

test-unit:
@./node_modules/.bin/grunt karma
@./node_modules/.bin/karma start src/javascripts/test/karma.conf.js --single-run

test-e2e:
@./node_modules/.bin/grunt test:local:e2e
@./node_modules/.bin/grunt test:e2e

test: test-unit test-e2e
14 changes: 1 addition & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,22 +33,10 @@
"file-loader": "^0.8.1",
"font-awesome": "^4.3.0",
"grunt": "~0.4.4",
"grunt-babel": "^4.0.0",
"grunt-cli": "^0.1.13",
"grunt-concurrent": "^0.5.0",
"grunt-contrib-clean": "^0.6.0",
"grunt-contrib-compass": "~0.7.2",
"grunt-contrib-concat": "^0.5.0",
"grunt-contrib-connect": "^0.8.0",
"grunt-contrib-copy": "^0.6.0",
"grunt-contrib-cssmin": "^0.10.0",
"grunt-contrib-requirejs": "^0.4.4",
"grunt-contrib-uglify": "~0.6.0",
"grunt-contrib-watch": "~0.5.2",
"grunt-exec": "^0.4.6",
"grunt-karma": "^0.8.3",
"grunt-mocha-test": "^0.12.7",
"grunt-ng-annotate": "^0.10.0",
"grunt-protractor-runner": "^1.2.1",
"html-loader": "^0.3.0",
"humane-js": "^3.2.2",
Expand Down Expand Up @@ -91,6 +79,6 @@
"node": ">=0.10.0"
},
"scripts": {
"test": "grunt test"
"test": "make test"
}
}

0 comments on commit 5ec6efd

Please sign in to comment.