summaryrefslogtreecommitdiffstats
path: root/spec/env/common.js
diff options
context:
space:
mode:
authorkpdecker <kpdecker@gmail.com>2015-09-23 21:59:49 -0500
committerkpdecker <kpdecker@gmail.com>2015-09-23 21:59:58 -0500
commit861d6f7b8d8149657c5396ed6b2e2930294edd4e (patch)
tree3917ebbcec2ea63867e0484dbf10c3a7ca2cb2ea /spec/env/common.js
parentfffb5a985f8ff7cd75f2c16b37b69f7ddd3ba9a0 (diff)
downloadhandlebars.js-861d6f7b8d8149657c5396ed6b2e2930294edd4e.zip
handlebars.js-861d6f7b8d8149657c5396ed6b2e2930294edd4e.tar.gz
handlebars.js-861d6f7b8d8149657c5396ed6b2e2930294edd4e.tar.bz2
Fix tests under IE
Diffstat (limited to 'spec/env/common.js')
-rw-r--r--spec/env/common.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/env/common.js b/spec/env/common.js
index 2a24db2..e378052 100644
--- a/spec/env/common.js
+++ b/spec/env/common.js
@@ -61,12 +61,12 @@ global.shouldThrow = function(callback, type, msg) {
try {
callback();
failed = true;
- } catch (err) {
- if (type && !(err instanceof type)) {
- throw new AssertError('Type failure: ' + err);
+ } catch (caught) {
+ if (type && !(caught instanceof type)) {
+ throw new AssertError('Type failure: ' + caught);
}
- if (msg && !(msg.test ? msg.test(err.message) : msg === err.message)) {
- throw new AssertError('Throw mismatch: Expected ' + err.message + ' to match ' + msg + '\n\n' + err.stack, shouldThrow);
+ if (msg && !(msg.test ? msg.test(caught.message) : msg === caught.message)) {
+ throw new AssertError('Throw mismatch: Expected ' + caught.message + ' to match ' + msg + '\n\n' + caught.stack, shouldThrow);
}
}
if (failed) {