1 function shouldBe(actual, expected) {
2 if (actual !== expected)
3 throw new Error('bad value: ' + actual);
6 function testFunction(func) {
7 var array = Object.getOwnPropertyNames(func);
8 shouldBe(array.indexOf("arguments"), -1);
9 shouldBe(array.indexOf("caller"), -1);
12 testFunction((() => { }).bind());
13 testFunction((() => { "use strict"; }).bind());
14 testFunction((function () { }).bind());
15 testFunction((function () { "use strict"; }).bind());