2015-04-21 02:31:18 +00:00
|
|
|
// Karma configuration
|
|
|
|
// Generated on Mon Apr 20 2015 06:33:20 GMT-0700 (PDT)
|
|
|
|
|
|
|
|
module.exports = function(config) {
|
2015-04-21 03:02:11 +00:00
|
|
|
var configuration = {
|
2015-04-21 02:31:18 +00:00
|
|
|
|
|
|
|
// base path that will be used to resolve all patterns (eg. files, exclude)
|
|
|
|
basePath: '',
|
|
|
|
|
|
|
|
// frameworks to use
|
|
|
|
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
|
|
|
|
frameworks: ['mocha', 'requirejs', 'chai'],
|
|
|
|
|
|
|
|
// list of files / patterns to load in the browser
|
|
|
|
files: [
|
2016-08-25 16:39:36 +00:00
|
|
|
{pattern: 'lib/js/amd/dart_sdk.js', included: false},
|
|
|
|
{pattern: 'gen/codegen_output/pkg/*.js', included: false},
|
|
|
|
{pattern: 'gen/codegen_output/language/**/*.js', included: false},
|
|
|
|
{pattern: 'gen/codegen_output/corelib/**/*.js', included: false},
|
|
|
|
{pattern: 'gen/codegen_output/lib/**/*.js', included: false},
|
|
|
|
{pattern: 'test/browser/*.js', included: false},
|
2015-06-24 17:21:11 +00:00
|
|
|
'test-main.js',
|
2015-04-21 02:31:18 +00:00
|
|
|
],
|
|
|
|
|
|
|
|
// list of files to exclude
|
2016-08-25 16:39:36 +00:00
|
|
|
exclude: [],
|
2015-04-21 02:31:18 +00:00
|
|
|
|
|
|
|
// preprocess matching files before serving them to the browser
|
|
|
|
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
|
|
|
|
preprocessors: {
|
|
|
|
},
|
|
|
|
|
|
|
|
client: {
|
2015-08-06 17:14:12 +00:00
|
|
|
captureConsole: false,
|
2015-04-21 02:31:18 +00:00
|
|
|
mocha: {
|
2016-05-12 00:28:00 +00:00
|
|
|
ui: 'tdd',
|
|
|
|
timeout : 6000
|
2015-06-24 17:21:11 +00:00
|
|
|
},
|
2015-04-21 02:31:18 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
// test results reporter to use
|
|
|
|
// possible values: 'dots', 'progress'
|
|
|
|
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
|
|
|
|
reporters: ['progress'],
|
|
|
|
|
|
|
|
// web server port
|
|
|
|
port: 9876,
|
|
|
|
|
|
|
|
// enable / disable colors in the output (reporters and logs)
|
|
|
|
colors: true,
|
|
|
|
|
|
|
|
// level of logging
|
|
|
|
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
|
2015-08-03 21:08:28 +00:00
|
|
|
logLevel: config.LOG_INFO,
|
2015-04-21 02:31:18 +00:00
|
|
|
|
|
|
|
// enable / disable watching file and executing tests whenever any file changes
|
2015-04-21 03:25:37 +00:00
|
|
|
autoWatch: true,
|
2015-04-21 02:31:18 +00:00
|
|
|
|
2015-09-16 20:28:49 +00:00
|
|
|
browserNoActivityTimeout: 60000,
|
|
|
|
browserDisconnectTolerance: 5,
|
|
|
|
|
2015-04-21 02:31:18 +00:00
|
|
|
// start these browsers
|
|
|
|
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
|
|
|
|
customLaunchers: {
|
2015-09-10 16:14:45 +00:00
|
|
|
chrome_travis: {
|
|
|
|
base: 'Chrome',
|
2016-03-31 22:10:11 +00:00
|
|
|
flags: [ '--no-sandbox' ]
|
2015-09-10 16:14:45 +00:00
|
|
|
},
|
|
|
|
|
2015-06-24 17:21:11 +00:00
|
|
|
chrome_canary_travis: {
|
2015-08-03 21:08:28 +00:00
|
|
|
base: 'ChromeCanary',
|
2016-03-31 22:10:11 +00:00
|
|
|
flags: [ '--no-sandbox' ]
|
2015-04-21 02:43:54 +00:00
|
|
|
},
|
2015-04-21 02:31:18 +00:00
|
|
|
},
|
2015-12-11 20:18:20 +00:00
|
|
|
|
2016-04-29 23:41:24 +00:00
|
|
|
browsers: ['Chrome'],
|
2015-04-21 02:31:18 +00:00
|
|
|
|
|
|
|
// Continuous Integration mode
|
|
|
|
// if true, Karma captures browsers, runs the tests and exits
|
|
|
|
singleRun: false,
|
2015-04-21 03:02:11 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
if (process.env.TRAVIS) {
|
2016-04-28 18:29:38 +00:00
|
|
|
configuration.browsers = ['chrome_canary_travis'];
|
2015-06-24 17:21:11 +00:00
|
|
|
configuration.autoWatch = false;
|
2015-12-11 20:18:20 +00:00
|
|
|
// Enable this for more logging on Travis. It is too much for Travis to
|
|
|
|
// automatically display, but still results in a downloadable raw log.
|
|
|
|
// configuration.logLevel = config.LOG_DEBUG;
|
2015-08-06 17:14:12 +00:00
|
|
|
configuration.client.captureConsole = true;
|
2015-04-21 03:02:11 +00:00
|
|
|
}
|
|
|
|
|
2016-09-14 15:41:43 +00:00
|
|
|
if (process.env.DDC_BROWSERS) {
|
|
|
|
configuration.browsers = process.env.DDC_BROWSERS.split(':');
|
|
|
|
}
|
|
|
|
|
2015-04-21 03:02:11 +00:00
|
|
|
config.set(configuration);
|
2015-04-21 02:31:18 +00:00
|
|
|
};
|