| 1 |
const decWithInitializer = (init) => (_, context) => { context.addInitializer(init) } |
| 2 |
|
| 3 |
expect(() => class { @decWithInitializer(null) static m() {} }).toThrow("An initializer must be a function") |
| 4 |
expect(() => class { @decWithInitializer(false) static m() {} }).toThrow("An initializer must be a function") |
| 5 |
expect(() => class { @decWithInitializer(void 0) static m() {} }).toThrow("An initializer must be a function"); |
| 6 |
expect(() => class { @decWithInitializer(() => {}) static m() {} }).not.toThrow(); |