mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-02 16:17:50 +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>');
|
||||
|
||||
Reference in New Issue
Block a user