|
1 |
| -// Karma configuration |
2 |
| -// Generated on Thu Mar 29 2018 11:50:44 GMT-0400 (EDT) |
3 |
| - |
4 | 1 | module.exports = (config) => {
|
5 | 2 | config.set({
|
6 |
| - // base path that will be used to resolve all patterns (eg. files, exclude) |
7 |
| - basePath: '', |
8 |
| - // frameworks to use |
9 |
| - // available frameworks: https://npmjs.org/browse/keyword/karma-adapter |
10 | 3 | frameworks: ['jasmine'],
|
11 |
| - // list of files / patterns to load in the browser |
12 | 4 | files: [
|
13 |
| - 'src/*/*.test.js', |
14 |
| - 'src/images/*.jpg', |
| 5 | + 'src/**/*_test.js', |
15 | 6 | ],
|
16 |
| - // list of files / patterns to exclude |
17 |
| - exclude: [], |
18 |
| - // preprocess matching files before serving them to the browser |
19 |
| - // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor |
20 | 7 | preprocessors: {
|
21 |
| - // add webpack as preprocessor |
22 |
| - 'src/*/*.test.js': ['webpack'], |
| 8 | + 'src/**/*_test.js': ['webpack'], |
23 | 9 | },
|
24 | 10 | webpack: {
|
25 | 11 | // karma watches the test entry points
|
26 | 12 | // (you don't need to specify the entry option)
|
27 | 13 | // webpack watches dependencies
|
28 | 14 |
|
29 | 15 | // webpack configuration
|
30 |
| - |
31 | 16 | },
|
32 | 17 | webpackMiddleware: {
|
33 |
| - // webpack-dev-middleware configuration |
34 |
| - // i. e. |
| 18 | + noInfo: true, |
35 | 19 | stats: 'errors-only',
|
36 | 20 | },
|
37 |
| - // test results reporter to use |
38 |
| - // possible values: 'dots', 'progress' |
39 |
| - // available reporters: https://npmjs.org/browse/keyword/karma-reporter |
| 21 | + browserStack: { |
| 22 | + username: process.env.BROWSERSTACK_USERNAME, |
| 23 | + accessKey: process.env.BROWSERSTACK_ACCESS_KEY |
| 24 | + }, |
| 25 | + captureTimeout: 120000, |
| 26 | + reportSlowerThan: 500, |
| 27 | + browserNoActivityTimeout: 180000, |
| 28 | + customLaunchers: { |
| 29 | + bs_chrome_mac: { |
| 30 | + base: 'BrowserStack', |
| 31 | + browser: 'chrome', |
| 32 | + browser_version: 'latest', |
| 33 | + os: 'OS X', |
| 34 | + os_version: 'High Sierra' |
| 35 | + }, |
| 36 | + }, |
40 | 37 | reporters: ['progress'],
|
41 |
| - // web server port |
42 | 38 | port: 9876,
|
43 |
| - // enable / disable colors in the output (reporters and logs) |
44 | 39 | colors: true,
|
45 |
| - // level of logging |
46 |
| - // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG |
47 | 40 | logLevel: config.LOG_INFO,
|
48 |
| - // enable / disable watching file and executing tests whenever any file changes |
49 | 41 | autoWatch: true,
|
50 |
| - // start these browsers |
51 |
| - // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher |
52 |
| - // browsers: ['Chrome', 'Firefox', 'Safari'], |
53 | 42 | browsers: ['Chrome'],
|
54 |
| - // Continuous Integration mode |
55 |
| - // if true, Karma captures browsers, runs the tests and exits |
56 | 43 | singleRun: false,
|
57 |
| - // Concurrency level |
58 |
| - // how many browser should be started simultaneous |
59 |
| - concurrency: Infinity, |
| 44 | + concurrency: Infinity |
60 | 45 | });
|
61 | 46 | };
|
0 commit comments