Skip to content

Commit

Permalink
chore(test): update to karma
Browse files Browse the repository at this point in the history
  • Loading branch information
petebacondarwin committed May 13, 2013
1 parent f11c7fd commit 843cf08
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ We've learned a lot while using and supporting AngularJS on the [mailing list](h
It is a complete project with a build system focused on AngularJS apps and tightly integrated with other tools commonly used in the AngularJS community:
* powered by [Grunt.js](http://gruntjs.com/)
* test written using [Jasmine](http://pivotal.github.com/jasmine/) syntax
* test are executed by [Testacular](http://vojtajina.github.com/testacular/) (integrated with the Grunt.js build)
* test are executed by [Karma Test Runner](http://karma-runner.github.io/0.8/index.html) (integrated with the Grunt.js build)
* build supporting JS, CSS and AngularJS templates minification
* [Twitter's bootstrap](http://twitter.github.com/bootstrap/) with LESS templates processing integrated into the build
* [Travis-CI](https://travis-ci.org/) integration
Expand Down
18 changes: 9 additions & 9 deletions client/gruntFile.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,21 @@ module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-recess');
grunt.loadNpmTasks('grunt-testacular');
grunt.loadNpmTasks('grunt-karma');
grunt.loadNpmTasks('grunt-html2js');

// Default task.
grunt.registerTask('default', ['jshint','build','testacular:unit']);
grunt.registerTask('default', ['jshint','build','karma:unit']);
grunt.registerTask('build', ['clean','html2js','concat','recess:build','copy:assets']);
grunt.registerTask('release', ['clean','html2js','uglify','jshint','testacular:unit','concat:index', 'recess:min','copy:assets','testacular:e2e']);
grunt.registerTask('test-watch', ['testacular:watch']);
grunt.registerTask('release', ['clean','html2js','uglify','jshint','karma:unit','concat:index', 'recess:min','copy:assets','karma:e2e']);
grunt.registerTask('test-watch', ['karma:watch']);

// Print a timestamp (useful for when watching)
grunt.registerTask('timestamp', function() {
grunt.log.subhead(Date());
});

var testacularConfig = function(configFile, customOptions) {
var karmaConfig = function(configFile, customOptions) {
var options = { configFile: configFile, keepalive: true };
var travisOptions = process.env.TRAVIS && { browsers: ['Firefox'], reporters: 'dots' };
return grunt.util._.extend(options, customOptions, travisOptions);
Expand Down Expand Up @@ -53,10 +53,10 @@ module.exports = function (grunt) {
files: [{ dest: '<%= distdir %>', src : '**', expand: true, cwd: 'src/assets/' }]
}
},
testacular: {
unit: { options: testacularConfig('test/config/unit.js') },
e2e: { options: testacularConfig('test/config/e2e.js') },
watch: { options: testacularConfig('test/config/unit.js', { singleRun:false, autoWatch: true}) }
karma: {
unit: { options: karmaConfig('test/config/unit.js') },
e2e: { options: karmaConfig('test/config/e2e.js') },
watch: { options: karmaConfig('test/config/unit.js', { singleRun:false, autoWatch: true}) }
},
html2js: {
app: {
Expand Down
2 changes: 1 addition & 1 deletion client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"grunt-contrib-jshint": "~0.2.0",
"grunt-contrib-concat": "~0.1.3",
"grunt-contrib-uglify": "~0.1.1",
"grunt-testacular": "~0.3.0",
"grunt-karma": "~0.4.4",
"grunt-html2js": "~0.1.0",
"grunt-contrib-watch": "~0.3.1"
}
Expand Down

0 comments on commit 843cf08

Please sign in to comment.