mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-16 23:30:23 +00:00
chore: use Karma
This commit is contained in:
parent
10ae76673c
commit
91fa865bf2
9 changed files with 14 additions and 14 deletions
12
Gruntfile.js
12
Gruntfile.js
|
|
@ -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
2
angularFiles.js
vendored
|
|
@ -201,7 +201,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) {
|
||||
|
|
|
|||
|
|
@ -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());
|
||||
});
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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 : '',
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
"name": "AngularJS",
|
||||
"version": "0.0.0",
|
||||
"dependencies": {
|
||||
"testacular": "0.5.9",
|
||||
"jasmine-node": "1.2.3",
|
||||
"q-fs": "0.1.36",
|
||||
"qq": "0.3.5",
|
||||
|
|
@ -12,6 +11,7 @@
|
|||
"grunt-contrib-connect": "0.1.2",
|
||||
"grunt-contrib-compress": "0.4.1",
|
||||
"shelljs": "0.1.2",
|
||||
"karma": "~0.8",
|
||||
"yaml-js": "0.0.5"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue