12 lines
178 B
JavaScript
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");
|