Skip to content

Commit

Permalink
test: fix failing test due to await removal
Browse files Browse the repository at this point in the history
  • Loading branch information
Julien-R44 committed Nov 22, 2023
1 parent 92aa8e7 commit e31115f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tests/events.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,12 @@ test.group('Cache events', () => {
test('getOrSet emit cache:hit when value is found', async ({ assert }) => {
const emitter = new EventEmitter()
const { cache } = new CacheFactory().merge({ emitter }).create()
const event = pEvent(emitter, 'cache:hit')

await cache.set('foo', 'bar')

cache.getOrSet('foo', () => 'baz')

const event = await pEvent(emitter, 'cache:hit')
assert.deepEqual(event, { key: 'foo', value: 'bar', store: 'primary', graced: false })
assert.deepEqual(await event, { key: 'foo', value: 'bar', store: 'primary', graced: false })
})

test('getOrSet emit cache:written and cache:miss when value is not found', async ({ assert }) => {
Expand Down

0 comments on commit e31115f

Please sign in to comment.