1 | DIR = if process.env.CI then 'dist' else 'build'
|
2 | LIB_FILE = if process.env.minified then "#{DIR}/quickdom.js" else "#{DIR}/quickdom.debug.js"
|
3 |
|
4 | module.exports = (config)-> config.set
|
5 | basePath: '../'
|
6 | client: captureConsole: true unless process.env.sauce
|
7 | browserConsoleLogOptions: level:'log', terminal:true
|
8 | frameworks: ['mocha']
|
9 | files: [
|
10 | LIB_FILE
|
11 | 'node_modules/bluebird/js/browser/bluebird.js'
|
12 | 'test/sauceReporter.js'
|
13 | 'test/test.js'
|
14 | ]
|
15 | exclude: [
|
16 | '**/*.git'
|
17 | ]
|
18 |
|
19 | preprocessors: {"#{LIB_FILE}":'coverage'} if process.env.coverage
|
20 | reporters: do ()->
|
21 | reporters = ['progress']
|
22 | reporters.push('coverage') if process.env.coverage
|
23 | reporters.push('saucelabs') if process.env.sauce
|
24 | return reporters
|
25 |
|
26 | coverageReporter:
|
27 | type: 'lcov'
|
28 | dir: './coverage/'
|
29 | subdir: '.'
|
30 |
|
31 | electronOpts:
|
32 | show: false
|
33 |
|
34 | client:
|
35 |
|
36 | clearContext:false
|
37 | mocha: {reporter:'html'}
|
38 |
|
39 | port: 9876
|
40 | colors: true
|
41 | logLevel: config.LOG_INFO
|
42 |
|
43 |
|
44 |
|
45 | singleRun: process.env.sauce
|
46 | concurrency: if process.env.sauce then 2 else 5
|
47 | captureTimeout: 1.8e5 if process.env.sauce
|
48 | browserNoActivityTimeout: 1.8e5 if process.env.sauce
|
49 | browserDisconnectTimeout: 1e4 if process.env.sauce
|
50 | browserDisconnectTolerance: 3 if process.env.sauce
|
51 | browsers: if process.env.sauce then Object.keys(require('./sauceTargets')) else ['Chrome', 'Firefox', 'Opera', 'Safari']
|
52 | retryLimit: 1 if process.env.sauce
|
53 | customLaunchers: require('./sauceTargets')
|
54 | sauceLabs:
|
55 | testName: 'QuickDOM Test Suite'
|
56 | recordVideo: false
|
57 | recordScreenshots: false
|
58 | build: require('../package.json').version+'-'+Math.round(Math.random()*1e6).toString(16)
|
59 | username: 'quickdom'
|
60 | accessKey: '0c7a6cc2-ed14-4f08-b48d-e46c74905b6a'
|
61 |
|
62 |
|