Make the cache units tests better

This commit is contained in:
Daniel Kennedy
2026-01-29 14:06:32 -05:00
parent b4ca146200
commit 4d7db58d4c
4 changed files with 52 additions and 14 deletions
+19
View File
@@ -0,0 +1,19 @@
#!/usr/bin/env node
// Helper script to save cache for e2e testing
import * as cache from '../lib/cache.js'
const [prefix, runId] = process.argv.slice(2)
if (!prefix || !runId) {
console.error('Usage: save-cache.mjs <prefix> <runId>')
process.exit(1)
}
const key = `test-${prefix}-${runId}`
const paths = ['test-cache', '~/test-cache']
console.log(`Saving cache with key: ${key}`)
console.log(`Paths: ${paths.join(', ')}`)
const cacheId = await cache.saveCache(paths, key)
console.log(`Cache saved with ID: ${cacheId}`)