Tests for ES6 class syntax "super" On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". PASS (new Base) instanceof Base is true PASS (new Derived) instanceof Derived is true PASS (new Derived).callBaseMethod() is baseMethodValue PASS x = (new Derived).callBaseMethod; x() is baseMethodValue PASS (new Derived).callBaseMethodInGetter is baseMethodValue PASS (new Derived).callBaseMethodInSetter = 1; valueInSetter is baseMethodValue PASS (new Derived).baseMethodInGetterSetter is (new Base).baseMethod PASS (new Derived).baseMethodInGetterSetter = 1; valueInSetter is (new Base).baseMethod PASS Derived.staticMethod() is "base3" PASS (new SecondDerived).chainMethod() is ["base", "derived", "secondDerived"] PASS x = class extends Base { constructor() { super(); } super() {} } threw exception SyntaxError: Unexpected keyword 'super'. PASS x = class extends Base { constructor() { super(); } method() { super() } } threw exception SyntaxError: Cannot call super() outside of a class constructor.. PASS x = class extends Base { constructor() { super(); } method() { super } } threw exception SyntaxError: Cannot reference super.. PASS x = class extends Base { constructor() { super(); } method() { return new super } } threw exception SyntaxError: Cannot use new with super.. PASS x = class extends Base { constructor() { super(); } method1() { delete (super.foo) } method2() { delete super["foo"] } } did not throw exception. PASS (new x).method1() threw exception ReferenceError: Cannot delete a super property. PASS (new x).method2() threw exception ReferenceError: Cannot delete a super property. PASS new (class { constructor() { return undefined; } }) instanceof Object is true PASS new (class { constructor() { return 1; } }) instanceof Object is true PASS new (class extends Base { constructor() { return undefined } }) threw exception ReferenceError: Cannot access uninitialized variable.. PASS new (class extends Base { constructor() { super(); return undefined } }) instanceof Object is true PASS x = { }; new (class extends Base { constructor() { return x } }); is x PASS x instanceof Base is false PASS new (class extends Base { constructor() { } }) threw exception ReferenceError: Cannot access uninitialized variable.. PASS new (class extends Base { constructor() { return 1; } }) threw exception TypeError: Cannot return a non-object type in the constructor of a derived class.. PASS new (class extends null { constructor() { return undefined } }) threw exception ReferenceError: Cannot access uninitialized variable.. PASS new (class extends null { constructor() { super(); return undefined } }) threw exception TypeError: undefined is not an object (evaluating 'super()'). PASS x = { }; new (class extends null { constructor() { return x } }); is x PASS x instanceof Object is true PASS new (class extends null { constructor() { } }) threw exception ReferenceError: Cannot access uninitialized variable.. PASS new (class extends null { constructor() { return 1; } }) threw exception TypeError: Cannot return a non-object type in the constructor of a derived class.. PASS new (class extends null { constructor() { super() } }) threw exception TypeError: undefined is not an object (evaluating 'super()'). PASS new (class { constructor() { super() } }) threw exception SyntaxError: Cannot call super() in a base class constructor.. PASS function x() { super(); } threw exception SyntaxError: Cannot call super() outside of a class constructor.. PASS new (class extends Object { constructor() { function x() { super() } } }) threw exception SyntaxError: Cannot call super() outside of a class constructor.. PASS new (class extends Object { constructor() { function x() { super.method } } }) threw exception SyntaxError: super can only be used in a method of a derived class.. PASS function x() { super.method(); } threw exception SyntaxError: super can only be used in a method of a derived class.. PASS function x() { super(); } threw exception SyntaxError: Cannot call super() outside of a class constructor.. PASS successfullyParsed is true TEST COMPLETE