mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-09 02:17:50 +00:00
Avoid reporting tests to Sauce Labs when errors occur to force a retry.
This commit is contained in:
@@ -164,6 +164,9 @@
|
|||||||
// used to indicate testing a modularized build
|
// used to indicate testing a modularized build
|
||||||
ui.isModularize = /\b(?:commonjs|(index|main)\.js|lodash-(?:amd|node)|modularize|npm)\b/.test([location.pathname, location.search, ui.buildPath]);
|
ui.isModularize = /\b(?:commonjs|(index|main)\.js|lodash-(?:amd|node)|modularize|npm)\b/.test([location.pathname, location.search, ui.buildPath]);
|
||||||
|
|
||||||
|
// used to indicate testing in Sauce Labs' automated test cloud
|
||||||
|
ui.isSauceLabs = location.port == '9001';
|
||||||
|
|
||||||
// expose `ui`
|
// expose `ui`
|
||||||
window.ui = ui;
|
window.ui = ui;
|
||||||
|
|
||||||
|
|||||||
@@ -64,6 +64,12 @@
|
|||||||
mixinPrereqs(_);
|
mixinPrereqs(_);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
// avoid reporting tests to Sauce Labs when errors occur
|
||||||
|
if (ui.isSauceLabs) {
|
||||||
|
window.onerror = function() {
|
||||||
|
QUnit.config.done.length = 0;
|
||||||
|
};
|
||||||
|
}
|
||||||
var reBasename = /[\w.-]+$/,
|
var reBasename = /[\w.-]+$/,
|
||||||
basePath = ('//' + location.host + location.pathname.replace(reBasename, '')).replace(/\btest\/$/, ''),
|
basePath = ('//' + location.host + location.pathname.replace(reBasename, '')).replace(/\btest\/$/, ''),
|
||||||
modulePath = ui.buildPath.replace(/\.js$/, ''),
|
modulePath = ui.buildPath.replace(/\.js$/, ''),
|
||||||
@@ -127,4 +133,4 @@
|
|||||||
}());
|
}());
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -185,6 +185,12 @@
|
|||||||
if (!window.require) {
|
if (!window.require) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
// avoid reporting tests to Sauce Labs when errors occur
|
||||||
|
if (ui.isSauceLabs) {
|
||||||
|
window.onerror = function() {
|
||||||
|
QUnit.config.done.length = 0;
|
||||||
|
};
|
||||||
|
}
|
||||||
var reBasename = /[\w.-]+$/,
|
var reBasename = /[\w.-]+$/,
|
||||||
basePath = ('//' + location.host + location.pathname.replace(reBasename, '')).replace(/\btest\/$/, ''),
|
basePath = ('//' + location.host + location.pathname.replace(reBasename, '')).replace(/\btest\/$/, ''),
|
||||||
modulePath = ui.buildPath.replace(/\.js$/, ''),
|
modulePath = ui.buildPath.replace(/\.js$/, ''),
|
||||||
@@ -303,4 +309,4 @@
|
|||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -124,7 +124,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
// only excuse in Sauce Labs (buggy Safari and timers)
|
// only excuse in Sauce Labs (buggy Safari and timers)
|
||||||
if (location.port != '9001') {
|
if (!ui.isSauceLabs) {
|
||||||
delete QUnit.config.excused.Chaining['select/reject/sortBy'];
|
delete QUnit.config.excused.Chaining['select/reject/sortBy'];
|
||||||
delete QUnit.config.excused.Chaining['select/reject/sortBy in functional style'];
|
delete QUnit.config.excused.Chaining['select/reject/sortBy in functional style'];
|
||||||
delete QUnit.config.excused.Functions['throttle repeatedly with results'];
|
delete QUnit.config.excused.Functions['throttle repeatedly with results'];
|
||||||
@@ -176,6 +176,12 @@
|
|||||||
if (!window.require) {
|
if (!window.require) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
// avoid reporting tests to Sauce Labs when errors occur
|
||||||
|
if (ui.isSauceLabs) {
|
||||||
|
window.onerror = function() {
|
||||||
|
QUnit.config.done.length = 0;
|
||||||
|
};
|
||||||
|
}
|
||||||
var reBasename = /[\w.-]+$/,
|
var reBasename = /[\w.-]+$/,
|
||||||
basePath = ('//' + location.host + location.pathname.replace(reBasename, '')).replace(/\btest\/$/, ''),
|
basePath = ('//' + location.host + location.pathname.replace(reBasename, '')).replace(/\btest\/$/, ''),
|
||||||
modulePath = ui.buildPath.replace(/\.js$/, ''),
|
modulePath = ui.buildPath.replace(/\.js$/, ''),
|
||||||
@@ -239,4 +245,4 @@
|
|||||||
<li><%= data %></li>
|
<li><%= data %></li>
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
Reference in New Issue
Block a user