Skip to content
This repository was archived by the owner on Jul 5, 2023. It is now read-only.

Commit 8ce4e82

Browse files
committed
Updated testing scripts to use latest stable karma build.
1 parent 2ca7842 commit 8ce4e82

File tree

2 files changed

+82
-80
lines changed

2 files changed

+82
-80
lines changed

scripts/includeFiles/karma.conf.js

Lines changed: 80 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -2,82 +2,84 @@
22
// This assumes you run karma from the root of the repository.
33
//
44

5-
// base path, that will be used to resolve files and exclude
6-
basePath = '../../';
7-
8-
// Jasmine is our unit test framework.
9-
frameworks = ['jasmine'];
10-
11-
// list of files / patterns to load in the browser
12-
files = [
13-
JASMINE,
14-
JASMINE_ADAPTER,
15-
'src/js/thirdparty/angular.js',
16-
'src/tests/thirdparty/angular-mocks.js',
17-
'src/tests/thirdparty/sinon.js',
18-
'src/js/core.js',
19-
'src/js/lib/*.js',
20-
'src/js/directives/*.js',
21-
'src/tests/*.js',
22-
'src/tests/lib/*.js',
23-
'src/tests/directives/*.js',
24-
{ pattern: 'src/tests/directives/*.html', included: false, served: true },
25-
{ pattern: 'src/tests/lib/*.html', included: false, served: true },
26-
{ pattern: 'src/tests/thirdparty/jasmine/*.js', included: false, served: true },
27-
{ pattern: 'src/tests/thirdparty/jasmine/*.css', included: false, served: true },
28-
];
29-
30-
// Tell the http server to sever all files from http://localhost:9876/src/
31-
proxies = {
32-
'/src/': 'http://localhost:9876/base/src/',
33-
};
34-
35-
// list of files to exclude
36-
exclude = [
37-
];
38-
39-
// test results reporter to use
40-
// possible values: 'dots', 'progress', 'junit'
41-
reporters = ['progress'];
42-
43-
44-
// web server port
45-
port = 9876;
46-
47-
48-
// cli runner port
49-
runnerPort = 9100;
50-
51-
// enable / disable colors in the output (reporters and logs)
52-
colors = true;
53-
54-
// level of logging
55-
// possible values: LOG_DISABLE || LOG_ERROR || LOG_WARN || LOG_INFO || LOG_DEBUG
56-
logLevel = LOG_INFO;
57-
58-
// enable / disable watching file and executing tests whenever any file changes
59-
autoWatch = true;
60-
61-
// Start these browsers, currently available:
62-
// - Chrome
63-
// - ChromeCanary
64-
// - Firefox
65-
// - Opera
66-
// - Safari (only Mac)
67-
// - PhantomJS
68-
// - IE (only Windows)
69-
browsers = ['Chrome'];
70-
71-
72-
// If browser does not capture in given timeout [ms], kill it
73-
captureTimeout = 60000;
74-
75-
// Continuous Integration mode
76-
// if true, it capture browsers, run tests and exit
77-
singleRun = false;
78-
79-
plugins = [
80-
'karma-jasmine',
81-
'karma-chrome-launcher',
82-
];
5+
module.exports = function(config) {
6+
config.set({
7+
// base path, that will be used to resolve files and exclude
8+
basePath: '../../',
9+
10+
// Jasmine is our unit test framework.
11+
frameworks: ['jasmine'],
12+
13+
// list of files / patterns to load in the browser
14+
files: [
15+
'src/js/thirdparty/angular.js',
16+
'src/tests/thirdparty/angular-mocks.js',
17+
'src/tests/thirdparty/sinon.js',
18+
'src/js/core.js',
19+
'src/js/lib/*.js',
20+
'src/js/directives/*.js',
21+
'src/tests/*.js',
22+
'src/tests/lib/*.js',
23+
'src/tests/directives/*.js',
24+
{ pattern: 'src/tests/directives/*.html', included: false, served: true },
25+
{ pattern: 'src/tests/lib/*.html', included: false, served: true },
26+
{ pattern: 'src/tests/thirdparty/jasmine/*.js', included: false, served: true },
27+
{ pattern: 'src/tests/thirdparty/jasmine/*.css', included: false, served: true },
28+
],
29+
30+
// Tell the http server to sever all files from http://localhost:9876/src/
31+
proxies: {
32+
'/src/': 'http://localhost:9876/base/src/',
33+
},
34+
35+
// list of files to exclude
36+
exclude: [
37+
],
38+
39+
// test results reporter to use
40+
// possible values: 'dots', 'progress', 'junit'
41+
reporters: ['progress'],
42+
43+
44+
// web server port
45+
port: 9876,
46+
47+
48+
// cli runner port
49+
runnerPort: 9100,
50+
51+
// enable / disable colors in the output (reporters and logs)
52+
colors: true,
53+
54+
// level of logging
55+
// possible values: LOG_DISABLE || LOG_ERROR || LOG_WARN || LOG_INFO || LOG_DEBUG
56+
logLevel: config.LOG_INFO,
57+
58+
// enable / disable watching file and executing tests whenever any file changes
59+
autoWatch: true,
60+
61+
// Start these browsers, currently available:
62+
// - Chrome
63+
// - ChromeCanary
64+
// - Firefox
65+
// - Opera
66+
// - Safari (only Mac)
67+
// - PhantomJS
68+
// - IE (only Windows)
69+
browsers: ['Chrome'],
70+
71+
72+
// If browser does not capture in given timeout [ms], kill it
73+
captureTimeout: 60000,
74+
75+
// Continuous Integration mode
76+
// if true, it capture browsers, run tests and exit
77+
singleRun: false,
78+
79+
plugins: [
80+
'karma-jasmine',
81+
'karma-chrome-launcher',
82+
],
83+
});
84+
}
8385

scripts/startJsTester

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
# To use this script, you must have installed node.js and karma.
2121
# To install karma, do the following:
2222
# 1. Download the node.js pkg file from http://nodejs.org and follow instructions.
23-
# 2. sudo npm -g karma
24-
#
23+
# 2. sudo npm install -g karma karma-jasmine karma-chrome-launcher
24+
2525
# The karma configuration file, which details configures which js files
2626
# are included, how to run http server and what files to export, etc,
2727
# is in scripts/includeFiles/karma.conf.js

0 commit comments

Comments
 (0)