mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-05-19 20:01:52 +00:00
chore: use Karma
This commit is contained in:
parent
61f2767ce6
commit
c2e215fab6
9 changed files with 14 additions and 14 deletions
12
Gruntfile.js
12
Gruntfile.js
|
|
@ -45,17 +45,17 @@ module.exports = function(grunt) {
|
||||||
|
|
||||||
|
|
||||||
test: {
|
test: {
|
||||||
jqlite: 'testacular-jqlite.conf.js',
|
jqlite: 'karma-jqlite.conf.js',
|
||||||
jquery: 'testacular-jquery.conf.js',
|
jquery: 'karma-jquery.conf.js',
|
||||||
modules: 'testacular-modules.conf.js',
|
modules: 'karma-modules.conf.js',
|
||||||
//NOTE run grunt test:e2e instead and it will start a webserver for you
|
//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: {
|
autotest: {
|
||||||
jqlite: 'testacular-jqlite.conf.js',
|
jqlite: 'karma-jqlite.conf.js',
|
||||||
jquery: 'testacular-jquery.conf.js'
|
jquery: 'karma-jquery.conf.js'
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
2
angularFiles.js
vendored
2
angularFiles.js
vendored
|
|
@ -208,7 +208,7 @@ if (exports) {
|
||||||
var files = [];
|
var files = [];
|
||||||
|
|
||||||
[].splice.call(arguments, 0).forEach(function(file) {
|
[].splice.call(arguments, 0).forEach(function(file) {
|
||||||
if (file.match(/testacular/)) {
|
if (file.match(/karma/)) {
|
||||||
files.push(file);
|
files.push(file);
|
||||||
} else {
|
} else {
|
||||||
angularFiles[file].forEach(function(f) {
|
angularFiles[file].forEach(function(f) {
|
||||||
|
|
|
||||||
|
|
@ -50,12 +50,12 @@ module.exports = function(grunt) {
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
grunt.registerMultiTask('test', 'Run the unit tests with testacular', function(){
|
grunt.registerMultiTask('test', 'Run the unit tests with Karma', function(){
|
||||||
util.startTestacular.call(util, this.data, true, this.async());
|
util.startKarma.call(util, this.data, true, this.async());
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
grunt.registerMultiTask('autotest', 'Run and watch the unit tests with testacular', function(){
|
grunt.registerMultiTask('autotest', 'Run and watch the unit tests with Karma', function(){
|
||||||
util.startTestacular.call(util, this.data, false, this.async());
|
util.startKarma.call(util, this.data, false, this.async());
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -30,11 +30,11 @@ module.exports = {
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
startTestacular: function(config, singleRun, done){
|
startKarma: function(config, singleRun, done){
|
||||||
var browsers = grunt.option('browsers');
|
var browsers = grunt.option('browsers');
|
||||||
var reporters = grunt.option('reporters');
|
var reporters = grunt.option('reporters');
|
||||||
var noColor = grunt.option('no-colors');
|
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' : '',
|
singleRun ? '--single-run=true' : '',
|
||||||
reporters ? '--reporters=' + reporters : '',
|
reporters ? '--reporters=' + reporters : '',
|
||||||
browsers ? '--browsers=' + browsers : '',
|
browsers ? '--browsers=' + browsers : '',
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
"q-fs": "0.1.36",
|
"q-fs": "0.1.36",
|
||||||
"qq": "0.3.5",
|
"qq": "0.3.5",
|
||||||
"shelljs": "0.1.2",
|
"shelljs": "0.1.2",
|
||||||
"testacular": "0.5.9",
|
"karma": "~0.8",
|
||||||
"yaml-js": "0.0.5"
|
"yaml-js": "0.0.5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue