Skip to content

Commit 41acad8

Browse files
test(*): Run test suite against angular 1.4.9;
make tests suite compatible with 1.4.x
1 parent e00aa69 commit 41acad8

12 files changed

+36140
-19
lines changed

Gruntfile.js

+11-6
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ module.exports = function (grunt) {
6969
},
7070
karma: {
7171
options: {
72-
configFile: 'config/karma.js',
72+
configFile: 'config/karma-1.4.9.js',
7373
singleRun: true,
7474
exclude: [],
7575
frameworks: ['jasmine'],
@@ -88,21 +88,26 @@ module.exports = function (grunt) {
8888
background: false,
8989
browsers: [ grunt.option('browser') || 'Chrome' ]
9090
},
91-
past: {
91+
ng108: {
9292
configFile: 'config/karma-1.0.8.js'
9393
},
94-
unstable: {
94+
ng115: {
9595
configFile: 'config/karma-1.1.5.js'
9696
},
97-
future: {
97+
ng1214: {
98+
configFile: 'config/karma-1.2.14.js'
99+
},
100+
ng130: {
98101
configFile: 'config/karma-1.3.0.js'
99102
},
103+
ng149: {
104+
configFile: 'config/karma-1.4.9.js'
105+
},
100106
background: {
101107
background: true,
102108
browsers: [ grunt.option('browser') || 'PhantomJS' ]
103109
},
104110
watch: {
105-
configFile: 'config/karma.js',
106111
singleRun: false,
107112
autoWatch: true,
108113
autoWatchInterval: 1
@@ -129,7 +134,7 @@ module.exports = function (grunt) {
129134
}
130135
});
131136

132-
grunt.registerTask('integrate', ['build', 'jshint', 'karma:unit', 'karma:past', 'karma:unstable']);
137+
grunt.registerTask('integrate', ['build', 'jshint', 'karma:ng149', 'karma:ng108', 'karma:ng115', 'karma:ng1214', 'karma:ng130']);
133138
grunt.registerTask('default', ['build', 'jshint', 'karma:unit']);
134139
grunt.registerTask('build', 'Perform a normal build', ['concat', 'uglify']);
135140
grunt.registerTask('dist', 'Perform a clean build', ['clean', 'build']);
File renamed without changes.

config/karma-1.4.9.js

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// Karma configuration file
2+
module.exports = function (karma) {
3+
4+
var files = require('../files').files;
5+
6+
karma.set({
7+
// base path, that will be used to resolve files and exclude
8+
basePath: '..',
9+
10+
// list of files / patterns to load in the browser
11+
files: [].concat(files.angular('1.4.9'), files.testUtils, files.src, files.test),
12+
13+
// level of logging
14+
// possible values: LOG_DISABLE || LOG_ERROR || LOG_WARN || LOG_INFO || LOG_DEBUG
15+
logLevel: karma.LOG_DEBUG,
16+
frameworks: ['jasmine'],
17+
18+
// Start these browsers, currently available:
19+
// - Chrome
20+
// - ChromeCanary
21+
// - Firefox
22+
// - Opera
23+
// - Safari
24+
// - PhantomJS
25+
browsers: [ 'PhantomJS' ]
26+
})
27+
};

files.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ routerFiles = {
2323
return [
2424
'lib/angular-' + version + '/angular.js',
2525
'lib/angular-' + version + '/angular-mocks.js'
26-
].concat(['1.2.14', '1.3.0'].indexOf(version) !== -1 ? ['lib/angular-' + version + '/angular-animate.js'] : []);
26+
].concat(['1.0.8', '1.1.5'].indexOf(version) === -1 ? ['lib/angular-' + version + '/angular-animate.js'] : []);
2727
}
2828
};
2929

0 commit comments

Comments
 (0)