2018-03-24 16:22:20 +05:30

12 lines
178 B
JavaScript

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