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

10 lines
160 B
JavaScript

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