-
Notifications
You must be signed in to change notification settings - Fork 36
/
test-unit.conf.js
100 lines (82 loc) · 3.41 KB
/
test-unit.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
// Karma configuration
// http://karma-runner.github.io/0.10/config/configuration-file.html
module.exports = function(config) {
config.set({
// list of files / patterns to load in the browser
// **/*.js: All files with a "js" extension in all subdirectories
// **/!(jquery).js: Same as previous, but excludes "jquery.js"
// **/(foo|bar).js: In all subdirectories, all "foo.js" or "bar.js" files
files: [
'tests/unit/main.js',
{ pattern: 'app/modules/**/**/*.js', included: false, served: true },
{ pattern: 'app/modules/**/scripts/*.js', included: false, served: true },
{ pattern: 'app/modules/**/controllers/*.js', included: false, served: true },
{ pattern: 'app/modules/**/directives/*.js', included: false, served: true },
{ pattern: 'app/modules/**/factories/*.js', included: false, served: true },
{ pattern: 'app/modules/**/services/*.js', included: false, served: true },
{ pattern: 'app/components/**/*.js', included: false, served: true, watched: false },
],
// list of files / patterns to exclude
exclude: [
'app/modules/main.js',
'app/modules/**/test*/e2e/*'
],
// sauceLabs: {
// testName: 'CleverStack AngularJS (Frontend) Unit Tests',
// username: '',
// accessKey: ''
// },
// Define any custom launchers you want, use this for saucelabs
customLaunchers: {
slChrome: { base: 'SauceLabs', browserName: 'chrome', platform: 'Windows 7' },
slFirefox: { base: 'SauceLabs', browserName: 'firefox', version: '27' },
slIosSafari: { base: 'SauceLabs', browserName: 'iphone', platform: 'OS X 10.9', version: '7.1' },
slIe11: { base: 'SauceLabs', browserName: 'internet explorer', platform: 'Windows 8.1', version: '11' }
},
/* Start these browsers, currently available:
Chrome
ChromeCanary
PhantomJS
Firefox
Opera
Internet Explorer
Safari
*/
browsers: [
'Chrome',
'PhantomJS',
],
// http://karma-runner.github.io/0.8/config/preprocessors.html
preprocessors: {
'app/**/*.html': ['ng-html2js']
},
//https://github.com/karma-runner/karma-ng-html2js-preprocessor
ngHtml2JsPreprocessor: {
// strip this from the file path
stripPrefix: 'app/',
// prepend this to the
// prependPrefix: '',
// setting this option will create only a single module that contains templates
// from all the files, so you can load them all with module('foo')
// moduleName: 'templates'
},
// level of logging: LOG_DISABLE || LOG_ERROR || LOG_WARN || LOG_INFO || LOG_DEBUG
logLevel: config.LOG_INFO,
// base path, that will be used to resolve files and exclude
basePath: './',
// web server port
port: 9090,
// testing framework to use (jasmine/mocha/qunit/...)
frameworks: ['requirejs', 'jasmine'],
// Additional reporters, such as growl, junit, teamcity or coverage
reporters: ['progress'/*, 'saucelabs' */],
// Continuous Integration mode, if true, it capture browsers, run tests and exit
// singleRun: false, // (set it grunt file)
// Set this for CI, encase its slow (SauceLabs)
// captureTimeout: 120000,
// enable / disable watching file and executing tests whenever any file changes
// autoWatch: true, // (set it grunt file)
// Enable or disable colors in the output (reporters and logs).
colors: true
});
};