blob: 4a8850a536ff0a869b0e9a5ff786f61cf9362d59 [file] [log] [blame]
Tests for calling the constructors of ES6 classes
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS new A
PASS A():::"TypeError: Cannot call a class constructor"
PASS new B
PASS B():::"TypeError: Cannot call a class constructor"
PASS new (class { constructor() {} })()
PASS (class { constructor() {} })():::"TypeError: Cannot call a class constructor"
PASS new (class extends null { constructor() { super() } })():::"TypeError: function is not a constructor (evaluating 'super()')"
PASS (class extends null { constructor() { super() } })():::"TypeError: Cannot call a class constructor"
PASS successfullyParsed is true
TEST COMPLETE