chore: use Karma

This commit is contained in:
Vojta Jina
2013-03-20 18:57:13 -07:00
parent 61f2767ce6
commit c2e215fab6
9 changed files with 14 additions and 14 deletions

View File

@@ -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'
},

2
angularFiles.js vendored
View File

@@ -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) {

View File

@@ -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());
});
};

View File

@@ -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 : '',

View File

@@ -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"
}
}