* @param {import('./cache-tests.mjs').TestEnvironment['cacheStore']} type * @returns {Promise }
(type)
| 74 | * @returns {Promise<import('../../types/cache-interceptor').default.CacheStore>} |
| 75 | */ |
| 76 | async function makeCacheStore (type) { |
| 77 | const stores = { |
| 78 | MemoryCacheStore |
| 79 | } |
| 80 | |
| 81 | if (runtimeFeatures.has('sqlite')) { |
| 82 | const { default: SqliteCacheStore } = await import('../../lib/cache/sqlite-cache-store.js') |
| 83 | stores.SqliteCacheStore = SqliteCacheStore |
| 84 | } |
| 85 | |
| 86 | const Store = stores[type] |
| 87 | if (!Store) { |
| 88 | throw new TypeError(`unknown cache store: ${type}`) |
| 89 | } |
| 90 | |
| 91 | return new Store() |
| 92 | } |
| 93 | |
| 94 | /** |
| 95 | * @param {string} baseUrl |
no test coverage detected
searching dependent graphs…