| 36 | clearCache(); |
| 37 | }); |
| 38 | class TestClass { |
| 39 | public invoked = false; |
| 40 | @cache(1000) |
| 41 | public async doSomething(a: number, b: number): Promise<number> { |
| 42 | this.invoked = true; |
| 43 | return a + b; |
| 44 | } |
| 45 | } |
| 46 | |
| 47 | test('Result should be cached for 1s', async () => { |
| 48 | const cls = new TestClass(); |