blob: 78704f3fd32c1fe2dd386caf5a536651161df537 [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: undefined is not an object (evaluating 'super()')"
PASS (class extends null { constructor() { super() } })():::"TypeError: Cannot call a class constructor"
PASS successfullyParsed is true
TEST COMPLETE