mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-12 03:47:50 +00:00
Move compat mode testing to an argument instead of a query param.
This commit is contained in:
@@ -71,10 +71,10 @@ script:
|
|||||||
- "([ $SAUCE_LABS != false ] || [ $BUILD == false ]) && true || $BIN $OPTION ./test.js ../dist/lodash.$BUILD.js"
|
- "([ $SAUCE_LABS != false ] || [ $BUILD == false ]) && true || $BIN $OPTION ./test.js ../dist/lodash.$BUILD.js"
|
||||||
- "([ $SAUCE_LABS != false ] || [ $BUILD == false ]) && true || $BIN $OPTION ./test.js ../dist/lodash.$BUILD.min.js"
|
- "([ $SAUCE_LABS != false ] || [ $BUILD == false ]) && true || $BIN $OPTION ./test.js ../dist/lodash.$BUILD.min.js"
|
||||||
- "([ $SAUCE_LABS == false ] || [ $BUILD == 'underscore' ]) && true || node ./test/saucelabs.js runner=\"test/index.html?build=lodash-$BUILD\" tags=\"$BUILD,production\""
|
- "([ $SAUCE_LABS == false ] || [ $BUILD == 'underscore' ]) && true || node ./test/saucelabs.js runner=\"test/index.html?build=lodash-$BUILD\" tags=\"$BUILD,production\""
|
||||||
|
- "([ $SAUCE_LABS == false ] || [ $COMPAT == false ]) && true || node ./test/saucelabs.js runner=\"test/index.html?build=lodash-$BUILD\" tags=\"$BUILD,production,ie-compat-mode\" compatMode=7"
|
||||||
- "([ $SAUCE_LABS == false ] || [ $BUILD == 'underscore' ]) && true || node ./test/saucelabs.js runner=\"test/index.html?build=../dist/lodash.$BUILD.js\" tags=\"$BUILD,development\""
|
- "([ $SAUCE_LABS == false ] || [ $BUILD == 'underscore' ]) && true || node ./test/saucelabs.js runner=\"test/index.html?build=../dist/lodash.$BUILD.js\" tags=\"$BUILD,development\""
|
||||||
- "[ $SAUCE_LABS == false ] && true || node ./test/saucelabs.js name=\"backbone tests\" runner=\"test/backbone.html?build=lodash-$BUILD\" tags=\"$BUILD,production,backbone\""
|
- "([ $SAUCE_LABS == false ] || [ $COMPAT == false ]) && true || node ./test/saucelabs.js runner=\"test/index.html?build=../dist/lodash.$BUILD.js\" tags=\"$BUILD,development,ie-compat-mode\" compatMode=7"
|
||||||
- "[ $SAUCE_LABS == false ] && true || node ./test/saucelabs.js name=\"backbone tests\" runner=\"test/backbone.html?build=../dist/lodash.$BUILD.js\" tags=\"$BUILD,development,backbone\""
|
- "[ $SAUCE_LABS == false ] && true || node ./test/saucelabs.js name=\"backbone tests\" runner=\"test/backbone.html?build=lodash-$BUILD\" tags=\"$BUILD,production,backbone\""
|
||||||
|
- "[ $SAUCE_LABS == false ] && true || node ./test/saucelabs.js name=\"backbone tests\" runner=\"test/backbone.html?build=../dist/lodash.$BUILD.js\" tags=\"$BUILD,development,backbone\""
|
||||||
- "[ $SAUCE_LABS == false ] && true || node ./test/saucelabs.js name=\"underscore tests\" runner=\"test/underscore.html?build=lodash-$BUILD\" tags=\"$BUILD,production,underscore\""
|
- "[ $SAUCE_LABS == false ] && true || node ./test/saucelabs.js name=\"underscore tests\" runner=\"test/underscore.html?build=lodash-$BUILD\" tags=\"$BUILD,production,underscore\""
|
||||||
- "[ $SAUCE_LABS == false ] && true || node ./test/saucelabs.js name=\"underscore tests\" runner=\"test/underscore.html?build=../dist/lodash.$BUILD.js\" tags=\"$BUILD,development,underscore\""
|
- "[ $SAUCE_LABS == false ] && true || node ./test/saucelabs.js name=\"underscore tests\" runner=\"test/underscore.html?build=../dist/lodash.$BUILD.js\" tags=\"$BUILD,development,underscore\""
|
||||||
- "([ $SAUCE_LABS == false ] || [ $COMPAT == false ]) && true || node ./test/saucelabs.js runner=\"test/index.html?build=lodash-$BUILD&compat=7\" tags=\"$BUILD,production,ie-compat-mode\""
|
|
||||||
- "([ $SAUCE_LABS == false ] || [ $COMPAT == false ]) && true || node ./test/saucelabs.js runner=\"test/index.html?build=../dist/lodash.$BUILD.js&compat=7\" tags=\"$BUILD,development,ie-compat-mode\""
|
|
||||||
|
|||||||
@@ -27,6 +27,10 @@
|
|||||||
accessKey = process.env.SAUCE_ACCESS_KEY,
|
accessKey = process.env.SAUCE_ACCESS_KEY,
|
||||||
tunnelId = 'lodash_' + process.env.TRAVIS_JOB_NUMBER;
|
tunnelId = 'lodash_' + process.env.TRAVIS_JOB_NUMBER;
|
||||||
|
|
||||||
|
var compatMode = process.argv.reduce(function(result, value) {
|
||||||
|
return optionToValue('compatMode', value) || result;
|
||||||
|
}, null);
|
||||||
|
|
||||||
var runner = process.argv.reduce(function(result, value) {
|
var runner = process.argv.reduce(function(result, value) {
|
||||||
value = optionToValue('runner', value);
|
value = optionToValue('runner', value);
|
||||||
return value == null
|
return value == null
|
||||||
@@ -73,7 +77,7 @@
|
|||||||
isModern = /\bmodern\b/i.test(runnerQuery.build);
|
isModern = /\bmodern\b/i.test(runnerQuery.build);
|
||||||
|
|
||||||
// platforms to test IE compat mode
|
// platforms to test IE compat mode
|
||||||
if (runnerQuery.compat) {
|
if (compatMode) {
|
||||||
platforms = [
|
platforms = [
|
||||||
['WIN8.1', 'internet explorer', '11'],
|
['WIN8.1', 'internet explorer', '11'],
|
||||||
['Windows 7', 'internet explorer', '10'],
|
['Windows 7', 'internet explorer', '10'],
|
||||||
@@ -293,10 +297,9 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
http.createServer(function(req, res) {
|
http.createServer(function(req, res) {
|
||||||
var compat = url.parse(req.url, true).query.compat;
|
// see http://msdn.microsoft.com/en-us/library/ff955275(v=vs.85).aspx
|
||||||
if (compat) {
|
if (compatMode && path.extname(url.parse(req.url).pathname) == '.html') {
|
||||||
// see http://msdn.microsoft.com/en-us/library/ff955275(v=vs.85).aspx
|
res.setHeader('X-UA-Compatible', 'IE=' + compatMode);
|
||||||
res.setHeader('X-UA-Compatible', 'IE=' + compat);
|
|
||||||
}
|
}
|
||||||
mount(req, res);
|
mount(req, res);
|
||||||
}).listen(port);
|
}).listen(port);
|
||||||
|
|||||||
Reference in New Issue
Block a user