diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2018-12-18 11:39:00 +0100 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-12-18 11:39:00 +0100 |
commit | 76fe52eb81db323ceaa8396de39b76efbce1c25e (patch) | |
tree | 061c409281374d893f9730f89e6a4ef32d0b53f9 /services/sync/tests/unit/test_utils_catch.js | |
parent | 63635e38ff9341c02fae7f4557d230ec710947b6 (diff) | |
parent | 680c3eadb6aaec1f3653636db081a519e0f62ef5 (diff) | |
download | UXP-76fe52eb81db323ceaa8396de39b76efbce1c25e.tar UXP-76fe52eb81db323ceaa8396de39b76efbce1c25e.tar.gz UXP-76fe52eb81db323ceaa8396de39b76efbce1c25e.tar.lz UXP-76fe52eb81db323ceaa8396de39b76efbce1c25e.tar.xz UXP-76fe52eb81db323ceaa8396de39b76efbce1c25e.zip |
Merge branch 'master' into Basilisk-releasev2018.12.18
Diffstat (limited to 'services/sync/tests/unit/test_utils_catch.js')
-rw-r--r-- | services/sync/tests/unit/test_utils_catch.js | 54 |
1 files changed, 23 insertions, 31 deletions
diff --git a/services/sync/tests/unit/test_utils_catch.js b/services/sync/tests/unit/test_utils_catch.js index 5f50bf7e4..a10e5eb0d 100644 --- a/services/sync/tests/unit/test_utils_catch.js +++ b/services/sync/tests/unit/test_utils_catch.js @@ -8,46 +8,38 @@ function run_test() { catch: Utils.catch, _log: { debug: function(str) { - didThrow = str.search(/^Exception/) == 0; + didThrow = str.search(/^Exception: /) == 0; }, info: function(str) { wasLocked = str.indexOf("Cannot start sync: already syncing?") == 0; } }, - func: function() { - return this.catch(function() { - rightThis = this == obj; - didCall = true; - return 5; - })(); - }, + func: function() this.catch(function() { + rightThis = this == obj; + didCall = true; + return 5; + })(), - throwy: function() { - return this.catch(function() { - rightThis = this == obj; - didCall = true; - throw 10; - })(); - }, + throwy: function() this.catch(function() { + rightThis = this == obj; + didCall = true; + throw 10; + })(), - callbacky: function() { - return this.catch(function() { - rightThis = this == obj; - didCall = true; - throw 10; - }, function(ex) { - wasTen = (ex == 10) - })(); - }, + callbacky: function() this.catch(function() { + rightThis = this == obj; + didCall = true; + throw 10; + }, function(ex) { + wasTen = (ex == 10) + })(), - lockedy: function() { - return this.catch(function() { - rightThis = this == obj; - didCall = true; - throw("Could not acquire lock."); - })(); - } + lockedy: function() this.catch(function() { + rightThis = this == obj; + didCall = true; + throw("Could not acquire lock."); + })() }; _("Make sure a normal call will call and return"); |