Skip to content

Commit

Permalink
test(core): improve test coverage by removing/ignoring unnecessary code
Browse files Browse the repository at this point in the history
  • Loading branch information
moribvndvs committed Jul 23, 2019
1 parent e312994 commit dcbc6c5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
7 changes: 1 addition & 6 deletions projects/core/src/lib/idle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -393,18 +393,13 @@ export class Idle implements OnDestroy {
}

private doCountdown(): void {
const timeout = !this.timeoutVal ? 0 : this.timeoutVal;
const diff = this.getExpiryDiff(timeout);
const diff = this.getExpiryDiff(this.timeoutVal);
if (diff > 0) {
this.safeClearInterval('timeoutHandle');
this.interrupt(true);
return;
}

if (!this.idling) {
return;
}

if (this.countdown <= 0) {
this.timeout();
return;
Expand Down
1 change: 1 addition & 0 deletions projects/core/src/lib/idleexpiry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ export abstract class IdleExpiry {
* @return The current Date.
*/
now(): Date {
/* istanbul ignore next */
return new Date();
}

Expand Down

0 comments on commit dcbc6c5

Please sign in to comment.