Skip to content

Commit 579179e

Browse files
committed
[Fix] phantomjs‘ Reflect.apply does not throw properly on a bad array-like
Caused by #54; see enzymejs/enzyme#2439
1 parent 5692ba6 commit 579179e

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

.eslintrc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,13 @@
99
"max-statements-per-line": [2, { "max": 2 }],
1010
"operator-linebreak": [2, "before"],
1111
},
12+
13+
"overrides": [
14+
{
15+
"files": "test/**",
16+
"rules": {
17+
"no-throw-literal": 0,
18+
},
19+
},
20+
],
1221
}

test/index.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,3 +181,10 @@ test('proxies of functions', { skip: !proxy }, function (t) {
181181
t.ok(isCallable(proxy), 'proxies of functions are callable');
182182
t.end();
183183
});
184+
185+
test('throwing functions', function (t) {
186+
t.plan(1);
187+
188+
var thrower = function (a) { return a.b; };
189+
t.ok(isCallable(thrower), 'a function that throws is callable');
190+
});

0 commit comments

Comments
 (0)