()
| 67 | |
| 68 | it('should error when used on non getters and methods', () => { |
| 69 | const test = () => { |
| 70 | class DummyError { |
| 71 | @memoize |
| 72 | set random(_value: number) {} |
| 73 | } |
| 74 | |
| 75 | return new DummyError(); |
| 76 | }; |
| 77 | |
| 78 | expect(test).toThrowError('Memoize decorator can only be used on methods or get accessors.'); |
| 79 | }); |