-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.default.config.js
65 lines (56 loc) · 1.6 KB
/
test.default.config.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
// Default configuration for test runner
const config = {
rootDir: __dirname,
// Max number of runner instances allowed to run in parallel
// Configure maxInstance to 1 if the test should be run in order
maxInstance: 10,
// Array of specs file path to run tests
specs: [
'tests/*.test.js'
],
testFramework: {
script: 'mocha',
// The reporter that used other than mocha default.
// Need to pass in argument --use-reporter to take effect
reporter: {
name: 'mocha-junit-reporter',
options: {
// Options for mocha-junit-reporter
// Add hash to mochaFile to handle parallel running reports
mochaFile: '.reports/junit/test-results.[hash].xml'
}
},
// Test timeout is zero for unlimited timeout
timeout: 0,
coverage: {
reportDir: '.reports/coverage/',
reporters: ['text', 'html']
}
},
// Config for server that host app to be tested
server: {
isLocal: true,
baseUrl: 'http://localhost',
port: 8000
},
// Target browser environments
capabilities: [
{ name: 'chrome', /* version: '65', platform: 'MAC' */ },
{ name: 'firefox', /* version: '59', platform: 'MAC' */ },
// { name: 'safari' },
// { name: 'ie' }
],
// Config saucelabs connection
saucelabs: {
forCapabilities: [],
user: process.env.SAUCELABS_USER,
token: process.env.SAUCELABS_TOKEN
},
// Screenshot for visual regression test
screenshot: {
baselineDir: 'tests/baseline/',
diffDir: '.reports/screenshots/diff/',
screenshotDir: '.reports/screenshots/shots/'
}
};
module.exports = config;