mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-01 07:47:49 +00:00
Add IE compat mode testing to travis-ci.
This commit is contained in:
@@ -38,6 +38,8 @@ matrix:
|
||||
env: BIN="ringo" BUILD="legacy"
|
||||
- node_js: "0.10"
|
||||
env: SAUCELABS=true
|
||||
- node_js: "0.10"
|
||||
env: SAUCELABS=true OPTION="./test/index.html?compat=7"
|
||||
git:
|
||||
depth: 1
|
||||
branches:
|
||||
@@ -61,4 +63,4 @@ script:
|
||||
- "[ $BUILD != false ] && cd ./test || true"
|
||||
- "[ $BUILD == false ] && true || $BIN $OPTION ./test.js ../dist/lodash.$BUILD.js"
|
||||
- "[ $BUILD == false ] && true || $BIN $OPTION ./test.js ../dist/lodash.$BUILD.min.js"
|
||||
- "[ $SAUCELABS == false ] && true || node ./test/saucelabs.js"
|
||||
- "[ $SAUCELABS == false ] && true || node ./test/saucelabs.js $OPTION"
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user