Skip to content

Commit 3d47dae

Browse files
committed
test(cache): add clarifying comments to prevent flapper test confusion
- Added comments explaining sequential operation intent - Helps developers understand the test's timing requirements - No functional changes, just documentation
1 parent f03b832 commit 3d47dae

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

test/cache-with-ttl.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,14 @@ describe.sequential('cache-with-ttl', () => {
8181
})
8282

8383
it('should set and get different types', async () => {
84+
// Set values sequentially to avoid any potential race conditions.
8485
await cache.set('string', 'hello')
8586
await cache.set('number', 42)
8687
await cache.set('boolean', true)
8788
await cache.set('object', { foo: 'bar' })
8889
await cache.set('array', [1, 2, 3])
8990

91+
// Verify each value independently to isolate any failures.
9092
expect(await cache.get<string>('string')).toBe('hello')
9193
expect(await cache.get<number>('number')).toBe(42)
9294
expect(await cache.get<boolean>('boolean')).toBe(true)

0 commit comments

Comments
 (0)