-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathGruntfile.js
59 lines (55 loc) · 1.85 KB
/
Gruntfile.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
// SauceLabs unit tests setup.
module.exports = function gruntConfig(grunt) {
var browsers = [
{ browserName: 'chrome', version: '63.0', platform: 'Windows 10' },
{ browserName: 'firefox', version: '58.0', platform: 'Windows 10' },
{ browserName: 'safari', version: '8.0', platform: 'OS X 10.10' },
{ browserName: 'MicrosoftEdge', version: '14.14393', platform: 'Windows 10' },
{ browserName: 'internet explorer', version: '11.0', platform: 'Windows 8.1' },
{ browserName: 'internet explorer', version: '10.0', platform: 'Windows 8' },
{ browserName: 'internet explorer', version: '9.0', platform: 'Windows 7' }
];
var testURL = 'http://127.0.0.1:9999/test/test.html';
var cdnURL = 'https://unpkg.com/';
var reactPaths = [
['[email protected]/dist/react.min.js',
'[email protected]/dist/react-dom.min.js'],
['[email protected]/umd/react.production.min.js',
'[email protected]/umd/react-dom.production.min.js']
];
var urls = reactPaths.map(function mapPaths(path) {
return testURL + '?react=' + cdnURL + path[0] + '&dom=' + cdnURL + path[1];
});
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
connect: {
server: {
options: {
base: '',
port: 9999
}
}
},
'saucelabs-mocha': {
all: {
options: {
urls: urls,
browsers: browsers,
build: process.env.TRAVIS_JOB_ID,
testname: 'unit tests',
throttled: 5,
sauceConfig: {
recordVideo: false,
recordScreenshots: false,
tunnelIdentifier: process.env.TRAVIS_JOB_NUMBER
},
tunneled: false
}
}
},
watch: {}
});
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-saucelabs');
grunt.registerTask('default', ['connect', 'saucelabs-mocha']);
};