Skip to content

Commit 47e1ffc

Browse files
committed
Added tests for AngularJS versions 1.6.x
1 parent 3f8f644 commit 47e1ffc

8 files changed

Lines changed: 120 additions & 6 deletions

File tree

gulpfile.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
var gulp = require('gulp');
22
var karma = require('karma').Server;
3-
var bower = require('gulp-bower');
43

54
require('./test/angular-1.2/gulpfile');
65
require('./test/angular-1.3/gulpfile');
76
require('./test/angular-1.4/gulpfile');
87
require('./test/angular-1.5/gulpfile');
8+
require('./test/angular-1.6/gulpfile');
99

1010
/**
1111
* Run tests for all angular versions
1212
*/
13-
gulp.task('test-all-versions', ['test-1.2', 'test-1.3', 'test-1.4', 'test-1.5'], function (done) {
13+
gulp.task('test-all-versions', ['test-1.2', 'test-1.3', 'test-1.4', 'test-1.5', 'test-1.6'], function (done) {
1414
});
1515

1616
/**

test/angular-1.2/karma.conf.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ module.exports = function(config) {
4242

4343

4444
// web server port
45-
port: 9876,
45+
port: 9812,
4646

4747

4848
// enable / disable colors in the output (reporters and logs)

test/angular-1.3/karma.conf.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ module.exports = function(config) {
4242

4343

4444
// web server port
45-
port: 9876,
45+
port: 9813,
4646

4747

4848
// enable / disable colors in the output (reporters and logs)

test/angular-1.4/karma.conf.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ module.exports = function(config) {
4242

4343

4444
// web server port
45-
port: 9876,
45+
port: 9814,
4646

4747

4848
// enable / disable colors in the output (reporters and logs)

test/angular-1.5/karma.conf.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ module.exports = function(config) {
4242

4343

4444
// web server port
45-
port: 9876,
45+
port: 9815,
4646

4747

4848
// enable / disable colors in the output (reporters and logs)

test/angular-1.6/bower.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"name": "image-engine-angular",
3+
"description": "An AngularJS directive for ImageEngine",
4+
"authors": [
5+
"Luca Corbo (https://github.com/lucor)"
6+
],
7+
"license": "MIT",
8+
"ignore": [
9+
"**/.*",
10+
"node_modules",
11+
"bower_components",
12+
"test",
13+
"tests"
14+
],
15+
"dependencies": {
16+
"angular": "~1.6.0"
17+
},
18+
"devDependencies": {
19+
"angular-mocks": "~1.6.0"
20+
}
21+
}

test/angular-1.6/gulpfile.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
var gulp = require('gulp');
2+
var karma = require('karma').server;
3+
var bower = require('gulp-bower');
4+
5+
/**
6+
* Install dependencies for angular-1.6.x
7+
*/
8+
gulp.task('bower-1.6', function() {
9+
return bower({ directory: './bower_components', cwd: './test/angular-1.6' })
10+
});
11+
12+
/**
13+
* Run tests for angular-1.6.x
14+
*/
15+
gulp.task('test-1.6', ['bower-1.6'], function (done) {
16+
karma.start({
17+
configFile: __dirname + '/karma.conf.js',
18+
singleRun: true,
19+
noAutoWatch: true,
20+
reporters: 'dots',
21+
browsers: ['PhantomJS']
22+
}, done);
23+
});

test/angular-1.6/karma.conf.js

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
// Karma configuration
2+
3+
module.exports = function(config) {
4+
config.set({
5+
6+
// base path that will be used to resolve all patterns (eg. files, exclude)
7+
basePath: '',
8+
9+
10+
// frameworks to use
11+
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
12+
frameworks: ['mocha','chai'],
13+
14+
15+
// list of files / patterns to load in the browser
16+
files: [
17+
18+
'bower_components/angular/angular.js',
19+
'bower_components/angular-mocks/angular-mocks.js',
20+
'../../src/image-engine-angular.js',
21+
'../../test/**/*Spec.js'
22+
],
23+
24+
25+
// list of files to exclude
26+
exclude: [
27+
28+
],
29+
30+
31+
// preprocess matching files before serving them to the browser
32+
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
33+
preprocessors: {
34+
35+
},
36+
37+
38+
// test results reporter to use
39+
// possible values: 'dots', 'progress'
40+
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
41+
reporters: ['dots'],
42+
43+
44+
// web server port
45+
port: 9816,
46+
47+
48+
// enable / disable colors in the output (reporters and logs)
49+
colors: true,
50+
51+
52+
// level of logging
53+
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
54+
logLevel: config.LOG_INFO,
55+
56+
57+
// enable / disable watching file and executing tests whenever any file changes
58+
autoWatch: false,
59+
60+
61+
// start these browsers
62+
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
63+
browsers: ['PhantomJS'],
64+
65+
66+
// Continuous Integration mode
67+
// if true, Karma captures browsers, runs the tests and exits
68+
singleRun: true
69+
});
70+
};

0 commit comments

Comments
 (0)