Skip to content

Commit

Permalink
Ignore super calls from istanbul
Browse files Browse the repository at this point in the history
  • Loading branch information
frederikprijck committed Sep 6, 2021
1 parent 61b14b0 commit 6f5dced
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/
export class GenericError extends Error {
constructor(public error: string, public error_description: string) {
super(error_description);
super(error_description) /* istanbul ignore next */;

Object.setPrototypeOf(this, GenericError.prototype);
}
Expand All @@ -30,7 +30,7 @@ export class AuthenticationError extends GenericError {
public state: string,
public appState: any = null
) {
super(error, error_description);
super(error, error_description) /* istanbul ignore next */;
//https://github.com/Microsoft/TypeScript-wiki/blob/master/Breaking-Changes.md#extending-built-ins-like-error-array-and-map-may-no-longer-work
Object.setPrototypeOf(this, AuthenticationError.prototype);
}
Expand All @@ -42,7 +42,7 @@ export class AuthenticationError extends GenericError {
*/
export class TimeoutError extends GenericError {
constructor() {
super('timeout', 'Timeout');
super('timeout', 'Timeout') /* istanbul ignore next */;
//https://github.com/Microsoft/TypeScript-wiki/blob/master/Breaking-Changes.md#extending-built-ins-like-error-array-and-map-may-no-longer-work
Object.setPrototypeOf(this, TimeoutError.prototype);
}
Expand All @@ -53,15 +53,15 @@ export class TimeoutError extends GenericError {
*/
export class PopupTimeoutError extends TimeoutError {
constructor(public popup: Window) {
super();
super() /* istanbul ignore next */;
//https://github.com/Microsoft/TypeScript-wiki/blob/master/Breaking-Changes.md#extending-built-ins-like-error-array-and-map-may-no-longer-work
Object.setPrototypeOf(this, PopupTimeoutError.prototype);
}
}

export class PopupCancelledError extends GenericError {
constructor(public popup: Window) {
super('cancelled', 'Popup closed');
super('cancelled', 'Popup closed') /* istanbul ignore next */;
//https://github.com/Microsoft/TypeScript-wiki/blob/master/Breaking-Changes.md#extending-built-ins-like-error-array-and-map-may-no-longer-work
Object.setPrototypeOf(this, PopupCancelledError.prototype);
}
Expand All @@ -76,7 +76,7 @@ export class MfaRequiredError extends GenericError {
error_description: string,
public mfa_token: string
) {
super(error, error_description);
super(error, error_description) /* istanbul ignore next */;
//https://github.com/Microsoft/TypeScript-wiki/blob/master/Breaking-Changes.md#extending-built-ins-like-error-array-and-map-may-no-longer-work
Object.setPrototypeOf(this, MfaRequiredError.prototype);
}
Expand Down

0 comments on commit 6f5dced

Please sign in to comment.