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

jfcere / ngx-markdown / 3fd6366a-f091-402b-aa3c-ca4a17b31cfc

01 Sep 2025 04:49PM UTC coverage: 61.982% (-34.9%) from 96.89%
3fd6366a-f091-402b-aa3c-ca4a17b31cfc

Pull #597

circleci

jfcere
add support for sanitizer function
Pull Request #597: feat: add support for sanitizer function

84 of 121 branches covered (69.42%)

Branch coverage included in aggregate %.

12 of 12 new or added lines in 3 files covered. (100.0%)

123 existing lines in 6 files now uncovered.

185 of 313 relevant lines covered (59.11%)

12.86 hits per line

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

27.27
/lib/src/clipboard-button.component.ts
1
import { ChangeDetectionStrategy, Component, computed } from '@angular/core';
2
import { toSignal } from '@angular/core/rxjs-interop';
3
import { merge, of, Subject, timer } from 'rxjs';
4
import { distinctUntilChanged, mapTo, shareReplay, switchMap } from 'rxjs/operators';
5

6
const BUTTON_TEXT_COPY = 'Copy';
1✔
7
const BUTTON_TEXT_COPIED = 'Copied';
1✔
8

9
@Component({
10
  selector: 'markdown-clipboard',
11
  template: `
12
    <button
13
      class="markdown-clipboard-button"
14
      [class.copied]="copied()"
15
      (click)="onCopyToClipboardClick()"
16
    >{{ copiedText() }}</button>
17
  `,
18
  changeDetection: ChangeDetectionStrategy.OnPush,
19
})
20
export class ClipboardButtonComponent {
1✔
UNCOV
21
  private _buttonClick$ = new Subject<void>();
×
22

UNCOV
23
  readonly copied = toSignal(
×
24
    this._buttonClick$.pipe(
UNCOV
25
      switchMap(() => merge(
×
26
        of(true),
27
        timer(3000).pipe(mapTo(false)),
28
      )),
29
      distinctUntilChanged(),
30
      shareReplay(1),
31
    )
32
  );
33

UNCOV
34
  readonly copiedText = computed(() =>
×
UNCOV
35
    this.copied()
×
36
      ? BUTTON_TEXT_COPIED
37
      : BUTTON_TEXT_COPY
38
  );
39

40
  onCopyToClipboardClick(): void {
UNCOV
41
    this._buttonClick$.next();
×
42
  }
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