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

xxczaki / discord-bot / 21416840888

27 Jan 2026 10:32PM UTC coverage: 94.206% (-0.4%) from 94.578%
21416840888

push

github

xxczaki
update

963 of 1073 branches covered (89.75%)

Branch coverage included in aggregate %.

99 of 106 new or added lines in 8 files covered. (93.4%)

1 existing line in 1 file now uncovered.

2110 of 2189 relevant lines covered (96.39%)

12.08 hits per line

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

83.87
/src/utils/parseOpusCacheFilename.ts
1
export interface ParsedCacheFilename {
2
        title: string;
3
        author: string;
4
        durationSeconds: number | null;
5
}
6

7
export default function parseOpusCacheFilename(
8
        filename: string,
9
): ParsedCacheFilename | null {
10
        if (!filename.endsWith('.opus')) {
17✔
11
                return null;
2✔
12
        }
13

14
        const nameWithoutExtension = filename.slice(0, -5);
15✔
15
        const parts = nameWithoutExtension.split('_');
15✔
16

17
        if (parts.length < 2) {
15✔
18
                return null;
2✔
19
        }
20

21
        const lastPart = parts.at(-1);
13✔
22
        const durationSeconds = lastPart ? Number.parseInt(lastPart, 10) : Number.NaN;
13!
23
        const hasDuration = !Number.isNaN(durationSeconds);
17✔
24

25
        if (hasDuration) {
17✔
26
                const textParts = parts.slice(0, -1);
9✔
27
                const combinedText = textParts.join(' ');
9✔
28

29
                if (!combinedText) {
9!
NEW
30
                        return null;
×
31
                }
32

33
                return { title: combinedText, author: '', durationSeconds };
9✔
34
        }
35

36
        const combinedText = parts.join(' ');
4✔
37

38
        if (!combinedText) {
4!
NEW
39
                return null;
×
40
        }
41

42
        return { title: combinedText, author: '', durationSeconds: null };
4✔
43
}
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