mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-29 06:27:49 +00:00
Move test error catching code before any other script files.
This commit is contained in:
@@ -12,6 +12,17 @@
|
||||
<h1>Test</h1>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
// avoid reporting tests to Sauce Labs when script errors occur
|
||||
if (location.port == '9001') {
|
||||
window.onerror = function(message) {
|
||||
if (window.QUnit) {
|
||||
QUnit.config.done.length = 0;
|
||||
}
|
||||
global_test_results = { 'message': message };
|
||||
};
|
||||
}
|
||||
</script>
|
||||
<script src="../vendor/qunit/qunit/qunit.js"></script>
|
||||
<script src="../vendor/qunit-extras/qunit-extras.js"></script>
|
||||
<script src="../vendor/json-js/json2.js"></script>
|
||||
@@ -42,13 +53,6 @@
|
||||
}
|
||||
};
|
||||
|
||||
// avoid reporting tests to Sauce Labs when script errors occur
|
||||
if (ui.isSauceLabs) {
|
||||
window.onerror = function(message) {
|
||||
QUnit.config.done.length = 0;
|
||||
global_test_results = { 'message': message };
|
||||
};
|
||||
}
|
||||
// load Lo-Dash
|
||||
if (!ui.isModularize) {
|
||||
document.write('<script src="' + ui.buildPath + '"><\/script>');
|
||||
|
||||
@@ -11,6 +11,17 @@
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
// avoid reporting tests to Sauce Labs when script errors occur
|
||||
if (location.port == '9001') {
|
||||
window.onerror = function(message) {
|
||||
if (window.QUnit) {
|
||||
QUnit.config.done.length = 0;
|
||||
}
|
||||
global_test_results = { 'message': message };
|
||||
};
|
||||
}
|
||||
</script>
|
||||
<script src="../vendor/qunit/qunit/qunit.js"></script>
|
||||
<script src="../vendor/qunit-extras/qunit-extras.js"></script>
|
||||
<script src="../vendor/platform.js/platform.js"></script>
|
||||
@@ -154,13 +165,6 @@
|
||||
|
||||
QUnit.config.hidepassed = true;
|
||||
|
||||
// avoid reporting tests to Sauce Labs when script errors occur
|
||||
if (ui.isSauceLabs) {
|
||||
window.onerror = function(message) {
|
||||
QUnit.config.done.length = 0;
|
||||
global_test_results = { 'message': message };
|
||||
};
|
||||
}
|
||||
// load Lo-Dash and expose it to the bad extensions/shims
|
||||
if (!ui.isModularize) {
|
||||
addBizarroMethods();
|
||||
|
||||
@@ -19,6 +19,17 @@
|
||||
</div>
|
||||
<img id="chart_image" src="data:image/gif;base64,R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==">
|
||||
</div>
|
||||
<script>
|
||||
// avoid reporting tests to Sauce Labs when script errors occur
|
||||
if (location.port == '9001') {
|
||||
window.onerror = function(message) {
|
||||
if (window.QUnit) {
|
||||
QUnit.config.done.length = 0;
|
||||
}
|
||||
global_test_results = { 'message': message };
|
||||
};
|
||||
}
|
||||
</script>
|
||||
<script src="../vendor/qunit/qunit/qunit.js"></script>
|
||||
<script src="../vendor/qunit-extras/qunit-extras.js"></script>
|
||||
<script src="../vendor/jquery/jquery.js"></script>
|
||||
@@ -128,13 +139,6 @@
|
||||
}
|
||||
};
|
||||
|
||||
// avoid reporting tests to Sauce Labs when script errors occur
|
||||
if (ui.isSauceLabs) {
|
||||
window.onerror = function(message) {
|
||||
QUnit.config.done.length = 0;
|
||||
global_test_results = { 'message': message };
|
||||
};
|
||||
}
|
||||
// only excuse in Sauce Labs (buggy Safari and timers)
|
||||
else {
|
||||
delete QUnit.config.excused.Chaining['select/reject/sortBy'];
|
||||
|
||||
Reference in New Issue
Block a user