class Bar {} class Foo extends Bar { constructor() { super(this); } } expect(() => new Foo()).toThrow("this hasn't been initialised");