Skip to content

Commit a1e88ed

Browse files
committed
style(test): reformat wildcard pattern test with retry option
Reformat test to single-line function signature for consistency.
1 parent 7c3f427 commit a1e88ed

File tree

1 file changed

+11
-15
lines changed

1 file changed

+11
-15
lines changed

test/unit/cache-with-ttl.test.ts

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -262,21 +262,17 @@ describe.sequential('cache-with-ttl', () => {
262262
expect(await cache.get('posts:1')).toBe('hello')
263263
})
264264

265-
it(
266-
'should handle wildcard patterns',
267-
{ retry: 3 },
268-
async () => {
269-
await cache.set('npm/lodash/1.0.0', 'data1')
270-
await cache.set('npm/lodash/2.0.0', 'data2')
271-
await cache.set('npm/react/1.0.0', 'data3')
272-
273-
await cache.deleteAll('npm/lodash/*')
274-
275-
expect(await cache.get('npm/lodash/1.0.0')).toBeUndefined()
276-
expect(await cache.get('npm/lodash/2.0.0')).toBeUndefined()
277-
expect(await cache.get('npm/react/1.0.0')).toBe('data3')
278-
},
279-
)
265+
it('should handle wildcard patterns', { retry: 3 }, async () => {
266+
await cache.set('npm/lodash/1.0.0', 'data1')
267+
await cache.set('npm/lodash/2.0.0', 'data2')
268+
await cache.set('npm/react/1.0.0', 'data3')
269+
270+
await cache.deleteAll('npm/lodash/*')
271+
272+
expect(await cache.get('npm/lodash/1.0.0')).toBeUndefined()
273+
expect(await cache.get('npm/lodash/2.0.0')).toBeUndefined()
274+
expect(await cache.get('npm/react/1.0.0')).toBe('data3')
275+
})
280276

281277
it('should return count of deleted entries', async () => {
282278
await cache.set('key1', 'value1')

0 commit comments

Comments
 (0)