• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

cameri / nostream / 24596515233

18 Apr 2026 04:05AM UTC coverage: 45.923% (-3.2%) from 49.12%
24596515233

Pull #481

github

web-flow
Merge 5d21b4ec5 into 3cb65a66f
Pull Request #481: fix: properly await worker teardown in integration tests to prevent open handles

434 of 1071 branches covered (40.52%)

Branch coverage included in aggregate %.

6 of 8 new or added lines in 2 files covered. (75.0%)

79 existing lines in 9 files now uncovered.

1267 of 2633 relevant lines covered (48.12%)

2.99 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

40.91
/src/cache/client.ts
1
import { createClient, RedisClientOptions } from 'redis'
1✔
2
import { CacheClient } from '../@types/cache'
3
import { createLogger } from '../factories/logger-factory'
1✔
4

5

6
const debug = createLogger('cache-client')
1✔
7

8
export const getCacheConfig = (): RedisClientOptions => ({
1✔
9
  url: process.env.REDIS_URI ? process.env.REDIS_URI : `redis://${process.env.REDIS_USER}:${process.env.REDIS_PASSWORD}@${process.env.REDIS_HOST}:${process.env.REDIS_PORT}`,
×
10
  password: process.env.REDIS_PASSWORD,
11
})
12

13
let instance: CacheClient | undefined = undefined
1✔
14

15
export const getCacheClient = (): CacheClient => {
1✔
UNCOV
16
  if (!instance) {
×
UNCOV
17
    const config = getCacheConfig()
×
18
    // eslint-disable-next-line @typescript-eslint/no-unused-vars
UNCOV
19
    const { password: _, ...loggableConfig } = config
×
UNCOV
20
    debug('config: %o', loggableConfig)
×
UNCOV
21
    instance = createClient(config)
×
22
  }
23

UNCOV
24
  return instance
×
25
}
26

27
export const closeCacheClient = async (): Promise<void> => {
1✔
28
  if (instance?.isOpen) {
1!
NEW
29
    await instance.disconnect()
×
NEW
30
    instance = undefined
×
31
  }
32
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc