(
name: string,
cb: (cache: SQLiteCompilationCache, timestampProvider: TestTimestampProvider) => Promise<void>,
)
| 14 | |
| 15 | describe('SQLiteCompilationCache', () => { |
| 16 | function cacheIt( |
| 17 | name: string, |
| 18 | cb: (cache: SQLiteCompilationCache, timestampProvider: TestTimestampProvider) => Promise<void>, |
| 19 | ): void { |
| 20 | it(name, async () => { |
| 21 | const timestampProvider = new TestTimestampProvider(); |
| 22 | const cache = SQLiteCompilationCache.newInMemoryInstance(timestampProvider); |
| 23 | |
| 24 | try { |
| 25 | await cb(cache, timestampProvider); |
| 26 | } finally { |
| 27 | cache.close(); |
| 28 | } |
| 29 | }); |
| 30 | } |
| 31 | |
| 32 | cacheIt('can insert and get values', async (cache) => { |
| 33 | let result = await cache.getCachedEntry('files', 'file.ts', 'xxx'); |
no test coverage detected