Add IE compat mode testing to travis-ci.

This commit is contained in:
John-David Dalton
2013-11-02 10:56:00 -07:00
parent 21bf629505
commit eb7243233e
2 changed files with 22 additions and 3 deletions

View File

@@ -12,6 +12,13 @@
username = process.env.SAUCE_USERNAME,
accessKey = process.env.SAUCE_ACCESS_KEY;
var runnerPathname = (function() {
var args = process.argv;
return args.length > 2
? '/' + args[args.length - 1].replace(/^\W+/, '')
: '/test/index.html';
}());
var platforms = [
['Windows 7', 'chrome', ''],
['Windows 7', 'firefox', '25'],
@@ -30,6 +37,15 @@
['Windows 7', 'safari', '5']
];
if (url.parse(runnerPathname, true).query.compat) {
platforms = [
['WIN8.1', 'internet explorer', '11'],
['Windows 7', 'internet explorer', '10'],
['Windows 7', 'internet explorer', '9'],
['Windows 7', 'internet explorer', '8']
];
}
// create a web server for the local dir
var mount = ecstatic({
root: path.resolve(__dirname, '..'),
@@ -67,7 +83,7 @@
var testDefinition = {
'framework': 'qunit',
'platforms': platforms,
'url': 'http://localhost:' + port + '/test/index.html'
'url': 'http://localhost:' + port + runnerPathname
};
console.log('Starting saucelabs tests: ' + JSON.stringify(testDefinition));
@@ -105,7 +121,8 @@
function handleTestResults(results) {
var failingTests = results.filter(function(test) {
return !test.result || test.result.failed;
var result = test.result;
return !result || result.failed || /\berror\b/i.test(result.message);
});
var failingPlatforms = failingTests.map(function(test) {