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

damienbod / angular-auth-oidc-client / 14187973345

01 Apr 2025 05:30AM UTC coverage: 92.692% (-0.002%) from 92.694%
14187973345

push

github

FabianGosebrink
Updating es lint rules and removing newline between injects

719 of 844 branches covered (85.19%)

Branch coverage included in aggregate %.

175 of 197 new or added lines in 5 files covered. (88.83%)

1 existing line in 1 file now uncovered.

2604 of 2741 relevant lines covered (95.0%)

8.3 hits per line

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

93.75
/projects/angular-auth-oidc-client/src/lib/callback/interval.service.ts
1
import { inject, Injectable, NgZone } from '@angular/core';
2
import { Observable, Subscription } from 'rxjs';
3
import { DOCUMENT } from '@angular/common';
4

5
@Injectable({ providedIn: 'root' })
6
export class IntervalService {
1✔
7
  runTokenValidationRunning: Subscription | null = null;
4✔
8

9
  private readonly zone = inject(NgZone);
4✔
10
  private readonly document = inject(DOCUMENT);
4✔
11

12
  isTokenValidationRunning(): boolean {
UNCOV
13
    return Boolean(this.runTokenValidationRunning);
×
14
  }
15

16
  stopPeriodicTokenCheck(): void {
17
    if (this.runTokenValidationRunning) {
2✔
18
      this.runTokenValidationRunning.unsubscribe();
1✔
19
      this.runTokenValidationRunning = null;
1✔
20
    }
21
  }
22

23
  startPeriodicTokenCheck(repeatAfterSeconds: number): Observable<unknown> {
24
    const millisecondsDelayBetweenTokenCheck = repeatAfterSeconds * 1000;
1✔
25

26
    return new Observable((subscriber) => {
1✔
27
      let intervalId: number | undefined;
28

29
      this.zone.runOutsideAngular(() => {
1✔
30
        intervalId = this.document?.defaultView?.setInterval(
1✔
31
          () => this.zone.run(() => subscriber.next()),
2✔
32
          millisecondsDelayBetweenTokenCheck
33
        );
34
      });
35

36
      return (): void => {
1✔
37
        clearInterval(intervalId);
1✔
38
      };
39
    });
40
  }
41
}
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