• Home
  • History
  • Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1Tests for calling the constructors of ES6 classes
2
3On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
4
5
6PASS new A did not throw exception.
7PASS A() threw exception TypeError: Class constructor A cannot be invoked without 'new'.
8PASS new B did not throw exception.
9PASS B() threw exception TypeError: Class constructor B cannot be invoked without 'new'.
10PASS new (class { constructor() {} })() did not throw exception.
11PASS (class { constructor() {} })() threw exception TypeError: Class constructor  cannot be invoked without 'new'.
12PASS new (class extends null { constructor() { super() } })() threw exception TypeError: super is not a constructor.
13PASS (class extends null { constructor() { super() } })() threw exception TypeError: Class constructor  cannot be invoked without 'new'.
14PASS successfullyParsed is true
15
16TEST COMPLETE
17