forked from dart-archive/angular.dart
-
Notifications
You must be signed in to change notification settings - Fork 0
/
karma.conf.js
132 lines (118 loc) · 3.39 KB
/
karma.conf.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
var env = process.env;
function getClientArgs() {
if (env.TRAVIS == null || env.TESTS != "dart2js" ||
env.NUM_KARMA_SHARDS == null || env.KARMA_SHARD_ID == "") {
return null;
}
return {
travis: {
numKarmaShards: parseInt(env.NUM_KARMA_SHARDS),
karmaShardId: parseInt(env.KARMA_SHARD_ID)
}
};
}
module.exports = function(config) {
config.set({
//logLevel: config.LOG_DEBUG,
basePath: '.',
frameworks: ['dart-unittest'],
// list of files / patterns to load in the browser
// all tests must be 'included', but all other libraries must be 'served' and
// optionally 'watched' only.
files: [
'packages/web_components/platform.js',
'packages/web_components/dart_support.js',
'test/core_dom/web_components_support.js',
'test/*.dart',
'test/**/*_spec.dart',
'test/config/init_guinness.dart',
{pattern: 'packages/**/*.dart', watched: true, included: false, served: true},
{pattern: 'test/**/*.dart', watched: true, included: false, served: true},
{pattern: 'bin/**/*.dart', watched: true, included: false, served: true},
{pattern: 'lib/**/*.dart', watched: true, included: false, served: true},
'packages/browser/dart.js'
],
client: {
args: [],
clientArgs: getClientArgs()
},
exclude: [
'test/io/**',
'test/tools/transformer/**',
'test/tools/symbol_inspector/**'
],
autoWatch: false,
// If browser does not capture in given timeout [ms], kill it
captureTimeout: 120000,
// Time for dart2js to run on Travis... [ms]
browserNoActivityTimeout: 1500000,
plugins: [
'karma-dart',
'karma-chrome-launcher',
'karma-sauce-launcher',
'karma-firefox-launcher',
'karma-script-launcher',
'karma-junit-reporter',
'../../../karma-parser-getter-setter'
],
karmaDartImports: {
guinness: 'package:guinness/guinness_html.dart'
},
customLaunchers: {
'SL_Chrome': {
base: 'SauceLabs',
browserName: 'chrome',
version: '35'
},
'SL_Firefox': {
base: 'SauceLabs',
browserName: 'firefox',
version: '30'
},
'SL_Safari6': {
base: 'SauceLabs',
browserName: 'safari',
version: '6'
},
'SL_Safari7': {
base: 'SauceLabs',
browserName: 'safari',
version: '7'
},
'SL_IE10': {
base: 'SauceLabs',
browserName: 'internet explorer',
platform: 'Windows 8',
version: '10'
},
'SL_IE11': {
base: 'SauceLabs',
browserName: 'internet explorer',
platform: 'Windows 8.1',
version: '11'
},
DartiumWithWebPlatform: {
base: 'Dartium',
flags: ['--enable-experimental-web-platform-features'] }
},
browsers: ['DartiumWithWebPlatform'],
preprocessors: {
'test/core/parser/generated_getter_setter.dart': ['parser-getter-setter']
},
junitReporter: {
outputFile: 'test_out/unit.xml',
suite: 'unit'
},
sauceLabs: {
testName: 'AngularDart',
tunnelIdentifier: env.TRAVIS_JOB_NUMBER,
startConnect: false,
options: {
'selenium-version': '2.41.0',
'command-timeout': 600,
'idle-timeout': 600,
'max-duration': 5400
}
}
});
};