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

cameri / nostream / 25600147486

09 May 2026 11:35AM UTC coverage: 34.005% (-31.1%) from 65.118%
25600147486

Pull #615

github

web-flow
Merge 7dc8a4461 into f9f6d647a
Pull Request #615: test: add unit tests for remaining app workers (#489)

788 of 3168 branches covered (24.87%)

Branch coverage included in aggregate %.

0 of 4 new or added lines in 2 files covered. (0.0%)

1822 existing lines in 87 files now uncovered.

2352 of 6066 relevant lines covered (38.77%)

20.36 hits per line

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

0.0
/src/cli/utils/bootstrap.ts
UNCOV
1
import fs from 'fs'
×
UNCOV
2
import { homedir } from 'os'
×
UNCOV
3
import { join } from 'path'
×
4

UNCOV
5
import { getConfigBaseDir, getDefaultSettingsFilePath, getProjectPath, getSettingsFilePath } from './paths'
×
6

UNCOV
7
export const ensureNotRoot = (): void => {
×
8
  if (typeof process.geteuid === 'function' && process.geteuid() === 0) {
×
9
    throw new Error('Nostream should not be run as root.')
×
10
  }
11
}
12

UNCOV
13
export const ensureConfigBootstrap = (): void => {
×
14
  const configDir = getConfigBaseDir()
×
15
  const settingsFile = getSettingsFilePath()
×
16
  const defaultsFile = getDefaultSettingsFilePath()
×
17

18
  if (!fs.existsSync(configDir)) {
×
19
    fs.mkdirSync(configDir, { recursive: true })
×
20
  }
21

22
  if (!fs.existsSync(settingsFile)) {
×
23
    fs.copyFileSync(defaultsFile, settingsFile)
×
24
  }
25
}
26

UNCOV
27
export const ensureTorDataDir = (): void => {
×
28
  fs.mkdirSync(getProjectPath('.nostr', 'tor', 'data'), { recursive: true })
×
29
}
30

UNCOV
31
export const ensureI2PDataDir = (): void => {
×
32
  fs.mkdirSync(getProjectPath('.nostr', 'i2p', 'data'), { recursive: true })
×
33
}
34

UNCOV
35
export const getTorHostnamePath = (): string => getProjectPath('.nostr', 'tor', 'data', 'nostream', 'hostname')
×
36

UNCOV
37
export const getOnionKeyPath = (): string =>
×
38
  join(process.env.NOSTR_CONFIG_DIR ?? join(homedir(), '.nostr'), 'v3_onion_private_key')
×
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