OLD | NEW |
1 // Karma configuration | 1 // Karma configuration |
2 // Generated on Mon Apr 20 2015 06:33:20 GMT-0700 (PDT) | 2 // Generated on Mon Apr 20 2015 06:33:20 GMT-0700 (PDT) |
3 | 3 |
4 module.exports = function(config) { | 4 module.exports = function(config) { |
| 5 var harmony_flags = '--js-flags="' + [ |
| 6 '--harmony-arrow-functions', |
| 7 '--harmony-classes', |
| 8 '--harmony-computed-property-names', |
| 9 '--harmony-spreadcalls', |
| 10 ].join(' ') + '"'; |
| 11 |
5 var configuration = { | 12 var configuration = { |
6 | 13 |
7 // base path that will be used to resolve all patterns (eg. files, exclude) | 14 // base path that will be used to resolve all patterns (eg. files, exclude) |
8 basePath: '', | 15 basePath: '', |
9 | 16 |
10 // frameworks to use | 17 // frameworks to use |
11 // available frameworks: https://npmjs.org/browse/keyword/karma-adapter | 18 // available frameworks: https://npmjs.org/browse/keyword/karma-adapter |
12 frameworks: ['mocha', 'requirejs', 'chai'], | 19 frameworks: ['mocha', 'requirejs', 'chai'], |
13 | 20 |
14 // list of files / patterns to load in the browser | 21 // list of files / patterns to load in the browser |
15 files: [ | 22 files: [ |
16 'test-main.js', | 23 'lib/runtime/dart_*.js', |
17 'lib/runtime/dart_runtime.js', | 24 'lib/runtime/_*.js', |
18 'lib/runtime/dart/core.js', | 25 'lib/runtime/dart/*.js', |
19 'lib/runtime/dart/collection.js', | |
20 'lib/runtime/dart/math.js', | |
21 // {pattern: 'test/browser/*.js', included: false} | 26 // {pattern: 'test/browser/*.js', included: false} |
22 'test/browser/*.js', | 27 'test/browser/*.js', |
| 28 'test-main.js', |
23 ], | 29 ], |
24 | 30 |
25 // list of files to exclude | 31 // list of files to exclude |
26 exclude: [ | 32 exclude: [ |
27 ], | 33 ], |
28 | 34 |
29 // preprocess matching files before serving them to the browser | 35 // preprocess matching files before serving them to the browser |
30 // available preprocessors: https://npmjs.org/browse/keyword/karma-preproces
sor | 36 // available preprocessors: https://npmjs.org/browse/keyword/karma-preproces
sor |
31 preprocessors: { | 37 preprocessors: { |
32 }, | 38 }, |
33 | 39 |
34 client: { | 40 client: { |
35 mocha: { | 41 mocha: { |
36 ui: 'tdd' | 42 ui: 'tdd' |
37 } | 43 }, |
38 }, | 44 }, |
39 | 45 |
40 // test results reporter to use | 46 // test results reporter to use |
41 // possible values: 'dots', 'progress' | 47 // possible values: 'dots', 'progress' |
42 // available reporters: https://npmjs.org/browse/keyword/karma-reporter | 48 // available reporters: https://npmjs.org/browse/keyword/karma-reporter |
43 reporters: ['progress'], | 49 reporters: ['progress'], |
44 | 50 |
45 // web server port | 51 // web server port |
46 port: 9876, | 52 port: 9876, |
47 | 53 |
48 // enable / disable colors in the output (reporters and logs) | 54 // enable / disable colors in the output (reporters and logs) |
49 colors: true, | 55 colors: true, |
50 | 56 |
51 // level of logging | 57 // level of logging |
52 // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WAR
N || config.LOG_INFO || config.LOG_DEBUG | 58 // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WAR
N || config.LOG_INFO || config.LOG_DEBUG |
53 logLevel: config.LOG_DEBUG, | 59 logLevel: config.LOG_DEBUG, |
54 | 60 |
55 // enable / disable watching file and executing tests whenever any file chan
ges | 61 // enable / disable watching file and executing tests whenever any file chan
ges |
56 autoWatch: true, | 62 autoWatch: true, |
57 | 63 |
58 // start these browsers | 64 // start these browsers |
59 // available browser launchers: https://npmjs.org/browse/keyword/karma-launc
her | 65 // available browser launchers: https://npmjs.org/browse/keyword/karma-launc
her |
60 | 66 |
61 // FIXME(vsm): Once harmony is on by default, we can simply add the followin
g: | 67 // FIXME(vsm): Once harmony is on by default, we can simply add the followin
g: |
62 // browsers: ['Chrome'], | 68 // browsers: ['Chrome'], |
63 // and remove the custom launchers. | 69 // and remove the custom launchers. |
64 customLaunchers: { | 70 customLaunchers: { |
65 chrome_harmony: { | 71 chrome_harmony: { |
66 base: 'Chrome', | 72 base: 'Chrome', |
67 flags: ['--js-flags="--harmony-arrow-functions --harmony-classes --harmo
ny-computed-property-names"'] | 73 flags: [ harmony_flags ], |
68 }, | 74 }, |
69 | 75 |
70 chrome_canary_harmony: { | 76 chrome_canary_harmony: { |
71 base: 'ChromeCanary', | 77 base: 'ChromeCanary', |
72 flags: ['--js-flags="--harmony-arrow-functions --harmony-classes --harmo
ny-computed-property-names"'] | 78 flags: [ harmony_flags ], |
73 }, | 79 }, |
74 | 80 |
75 chrome_travis: { | 81 chrome_canary_travis: { |
76 » base: 'Chrome', | 82 » base: 'ChromeCanary', |
77 flags: ['--no-sandbox --js-flags="--harmony-arrow-functions --harmony-cl
asses --harmony-computed-property-names"'] | 83 flags: [ '--no-sandbox', harmony_flags ] |
78 }, | 84 }, |
79 }, | 85 }, |
80 browsers: ['chrome_harmony'], | 86 browsers: ['chrome_canary_harmony'], |
81 | 87 |
82 // Continuous Integration mode | 88 // Continuous Integration mode |
83 // if true, Karma captures browsers, runs the tests and exits | 89 // if true, Karma captures browsers, runs the tests and exits |
84 singleRun: false, | 90 singleRun: false, |
85 }; | 91 }; |
86 | 92 |
87 if (process.env.TRAVIS) { | 93 if (process.env.TRAVIS) { |
88 configuration.browsers = ['chrome_travis']; | 94 configuration.browsers = ['chrome_canary_travis']; |
| 95 configuration.autoWatch = false; |
89 } | 96 } |
90 | 97 |
91 config.set(configuration); | 98 config.set(configuration); |
92 }; | 99 }; |
OLD | NEW |