forked from emberjs/ember.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtestem.dist.js
94 lines (86 loc) · 3.14 KB
/
testem.dist.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
var FailureOnlyReporter = require('./lib/failure-only-testem-reporter');
function FailureOnlyPerBrowserReporter() {
FailureOnlyReporter.apply(this, arguments);
this._resultsByBrowser = {};
}
FailureOnlyPerBrowserReporter.prototype = Object.create(FailureOnlyReporter.prototype);
FailureOnlyPerBrowserReporter.prototype.constructor = FailureOnlyPerBrowserReporter;
FailureOnlyPerBrowserReporter.prototype.report = function(prefix, data) {
if (!this._resultsByBrowser[prefix]) {
this._resultsByBrowser[prefix] = {
total: 0,
pass: 0,
skipped: 0
};
}
this._resultsByBrowser[prefix].total++;
if (data.skipped) {
this._resultsByBrowser[prefix].skipped++;
} else if (data.passed) {
this._resultsByBrowser[prefix].pass++;
}
FailureOnlyReporter.prototype.report.apply(this, arguments);
};
FailureOnlyPerBrowserReporter.prototype.summaryDisplay = function() {
var originalSummary = FailureOnlyReporter.prototype.summaryDisplay.apply(this, arguments);
var lines = [];
var resultsByBrowser = this._resultsByBrowser;
Object.keys(resultsByBrowser).forEach(function(browser) {
var results = resultsByBrowser[browser];
lines.push('#');
lines.push('# Browser: ' + browser);
lines.push('# tests ' + results.total);
lines.push('# pass ' + results.pass);
lines.push('# skip ' + results.skipped);
lines.push('# fail ' + (results.total - results.pass - results.skipped));
});
lines.push('#');
return lines.join('\n') + '\n' + originalSummary;
};
module.exports = {
framework: "qunit",
test_page: "dist/tests/index.html?hidepassed&hideskipped&timeout=60000",
timeout: 540,
reporter: FailureOnlyPerBrowserReporter,
browser_start_timeout: 1200,
parallel: 4,
disable_watching: true,
launchers: {
BS_Chrome_Current: {
exe: "node_modules/.bin/browserstack-launch",
args: ["--os", "Windows", "--osv", "10", "--b", "chrome", "--bv", "latest", "-t", "1200", "--u", "<url>"],
protocol: "browser"
},
BS_Firefox_Current: {
exe: "node_modules/.bin/browserstack-launch",
args: ["--os", "Windows", "--osv", "10", "--b", "firefox", "--bv", "latest", "-t", "1200", "--u", "<url>"],
protocol: "browser"
},
BS_Safari_Current: {
exe: "node_modules/.bin/browserstack-launch",
args: ["--os", "OS X", "--osv", "High Sierra", "--b", "safari", "--bv", "11", "-t", "1200", "--u", "<url>"],
protocol: "browser"
},
BS_Safari_Last: {
exe: "node_modules/.bin/browserstack-launch",
args: ["--os", "OS X", "--osv", "Sierra", "--b", "safari", "--bv", "10.1", "-t", "1200", "--u", "<url>"],
protocol: "browser"
},
BS_MS_Edge: {
exe: "node_modules/.bin/browserstack-launch",
args: ["--os", "Windows", "--osv", "10", "--b", "edge", "--bv", "latest", "-t", "1200", "--u", "<url>"],
protocol: "browser"
},
BS_IE_11: {
exe: "node_modules/.bin/browserstack-launch",
args: ["--os", "Windows", "--osv", "10", "--b", "ie", "--bv", "11.0", "-t", "1200", "--u", "<url>"],
protocol: "browser"
}
},
launch_in_dev: [],
launch_in_ci: [
"BS_Safari_Current",
"BS_MS_Edge",
"BS_IE_11"
]
};