• Home
  • History
  • Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1Tests for ES6 class syntax default constructor
2
3On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
4
5
6PASS new A instanceof A is true
7PASS A() threw exception TypeError: Class constructor A cannot be invoked without 'new'.
8PASS A.prototype.constructor instanceof Function is true
9PASS A.prototype.constructor.name is "A"
10PASS new B instanceof A; new B instanceof A is true
11PASS B() threw exception TypeError: Class constructor B cannot be invoked without 'new'.
12PASS B.prototype.constructor.name is "B"
13PASS A !== B is true
14PASS A.prototype.constructor !== B.prototype.constructor is true
15PASS new (class extends (class { constructor(a, b) { return [a, b]; } }) {})(1, 2) is [1, 2]
16PASS successfullyParsed is true
17
18TEST COMPLETE
19