| // Inspired by mozilla tests |
| description('Tests for ES6 arrow function prototype property'); |
| shouldBe("typeof af1.prototype", "'undefined'"); |
| shouldBe("af1.hasOwnProperty('prototype')", "false"); |
| var af2 = (a) => {a + 1}; |
| shouldBe("typeof af2.prototype", "'undefined'"); |
| shouldBe("af2.hasOwnProperty('prototype')", "false"); |
| shouldBe("typeof af3.prototype", "'undefined'"); |
| shouldBe("af3.hasOwnProperty('prototype')", "false"); |
| af1.prototype = function (x) { return x + 1;}; |
| debug('af1.prototype = function (x) { return x + 1;}'); |
| shouldBe("typeof af1.prototype", "'function'"); |
| shouldBe("af1.prototype.toString()", "'function (x) { return x + 1;}'"); |
| shouldBe("af1.hasOwnProperty('prototype')", "true"); |
| debug('delete af1.prototype'); |
| shouldBe("typeof af1.prototype", "'undefined'"); |
| shouldBe("af1.hasOwnProperty('prototype')", "false"); |
| var successfullyParsed = true; |