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

SNApp-notes / web / 26250957649

21 May 2026 08:21PM UTC coverage: 77.443% (-0.4%) from 77.798%
26250957649

push

github

jcubic
add debugging logs

711 of 980 branches covered (72.55%)

Branch coverage included in aggregate %.

25 of 39 new or added lines in 9 files covered. (64.1%)

6 existing lines in 1 file now uncovered.

1421 of 1773 relevant lines covered (80.15%)

32.32 hits per line

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

71.43
/src/lib/debug.ts
1
let debugEnabled: boolean | null = null;
5✔
2

3
function isDebugEnabled(): boolean {
4
  if (typeof window === 'undefined') return false;
606!
5
  if (debugEnabled === null) {
606✔
6
    debugEnabled = new URLSearchParams(window.location.search).has('debug');
5✔
7
  }
8
  return debugEnabled;
606✔
9
}
10

11
export function resetDebugFlag() {
NEW
12
  debugEnabled = null;
×
13
}
14

15
export function debug(label: string, ...args: unknown[]) {
16
  if (isDebugEnabled()) {
606!
NEW
17
    console.log(`[DEBUG][${label}]`, ...args);
×
18
  }
19
}
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