Skip to content

Commit

Permalink
chore: use Karma
Browse files Browse the repository at this point in the history
  • Loading branch information
vojtajina committed Apr 1, 2013
1 parent 61f2767 commit c2e215f
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 14 deletions.
12 changes: 6 additions & 6 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,17 @@ module.exports = function(grunt) {


test: {
jqlite: 'testacular-jqlite.conf.js',
jquery: 'testacular-jquery.conf.js',
modules: 'testacular-modules.conf.js',
jqlite: 'karma-jqlite.conf.js',
jquery: 'karma-jquery.conf.js',
modules: 'karma-modules.conf.js',
//NOTE run grunt test:e2e instead and it will start a webserver for you
end2end: 'testacular-e2e.conf.js'
end2end: 'karma-e2e.conf.js'
},


autotest: {
jqlite: 'testacular-jqlite.conf.js',
jquery: 'testacular-jquery.conf.js'
jqlite: 'karma-jqlite.conf.js',
jquery: 'karma-jquery.conf.js'
},


Expand Down
2 changes: 1 addition & 1 deletion angularFiles.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ if (exports) {
var files = [];

[].splice.call(arguments, 0).forEach(function(file) {
if (file.match(/testacular/)) {
if (file.match(/karma/)) {
files.push(file);
} else {
angularFiles[file].forEach(function(f) {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions lib/grunt/plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ module.exports = function(grunt) {
});


grunt.registerMultiTask('test', 'Run the unit tests with testacular', function(){
util.startTestacular.call(util, this.data, true, this.async());
grunt.registerMultiTask('test', 'Run the unit tests with Karma', function(){
util.startKarma.call(util, this.data, true, this.async());
});


grunt.registerMultiTask('autotest', 'Run and watch the unit tests with testacular', function(){
util.startTestacular.call(util, this.data, false, this.async());
grunt.registerMultiTask('autotest', 'Run and watch the unit tests with Karma', function(){
util.startKarma.call(util, this.data, false, this.async());
});
};
4 changes: 2 additions & 2 deletions lib/grunt/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ module.exports = {
},


startTestacular: function(config, singleRun, done){
startKarma: function(config, singleRun, done){
var browsers = grunt.option('browsers');
var reporters = grunt.option('reporters');
var noColor = grunt.option('no-colors');
var p = spawn('node', ['node_modules/testacular/bin/testacular', 'start', config,
var p = spawn('node', ['node_modules/karma/bin/karma', 'start', config,
singleRun ? '--single-run=true' : '',
reporters ? '--reporters=' + reporters : '',
browsers ? '--browsers=' + browsers : '',
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"q-fs": "0.1.36",
"qq": "0.3.5",
"shelljs": "0.1.2",
"testacular": "0.5.9",
"karma": "~0.8",
"yaml-js": "0.0.5"
}
}

0 comments on commit c2e215f

Please sign in to comment.