1 | module.exports = function(config) {
|
2 | var detectBrowsers = {
|
3 | enabled: false,
|
4 | usePhantomJS: false
|
5 | },
|
6 | browsers = config.browsers,
|
7 | reporters = ['dots'];
|
8 |
|
9 |
|
10 | if (process.env.BROWSER_STACK_USERNAME) {
|
11 | browsers = ['chrome_bs'];
|
12 | reporters = ['teamcity'];
|
13 | }
|
14 |
|
15 |
|
16 |
|
17 | if (!browsers.length) {
|
18 | detectBrowsers.enabled = true;
|
19 | }
|
20 |
|
21 | config.set({
|
22 | basePath: '..',
|
23 | frameworks: ['qunit', 'detectBrowsers'],
|
24 |
|
25 | files: [
|
26 | 'node_modules/sinon/pkg/sinon.js',
|
27 | 'node_modules/sinon/pkg/sinon-ie.js',
|
28 | 'node_modules/video.js/dist/video.js',
|
29 | 'node_modules/video.js/dist/video-js.css',
|
30 | 'test/dist/bundle.js'
|
31 | ],
|
32 |
|
33 | browsers: browsers,
|
34 |
|
35 | customLaunchers: {
|
36 | chrome_bs: {
|
37 | base: 'BrowserStack',
|
38 | browser: 'chrome',
|
39 | os: 'Windows',
|
40 | os_version: '8.1'
|
41 | }
|
42 | },
|
43 |
|
44 | browserStack: {
|
45 | project: process.env.npm_package_name,
|
46 | name: process.env.TEAMCITY_PROJECT_NAME + process.env.BUILD_NUMBER,
|
47 | pollingTimeout: 30000
|
48 | },
|
49 |
|
50 | detectBrowsers: detectBrowsers,
|
51 | reporters: reporters,
|
52 | port: 9876,
|
53 | colors: true,
|
54 | autoWatch: false,
|
55 | singleRun: true,
|
56 | concurrency: Infinity
|
57 | });
|
58 | };
|