Skip to content

Commit

Permalink
Add keys retrieval and validation to cache module tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pelikhan committed Aug 29, 2024
1 parent c58210f commit d4de7d9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/sample/genaisrc/cache.genai.mts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ if (result !== value) throw new Error(`unexpected value: ${result}`)
const values = await cache.values()
if (!values.includes(value)) throw new Error(`unexpected values: ${values}`)

const keys = await cache.keys()
if (!keys.includes(key)) throw new Error(`unexpected keys: ${keys}`)

console.log(`cache test passed`)

$`Generate a random word.`
Expand Down

0 comments on commit d4de7d9

Please sign in to comment.