all files / core/errors/ regex-match-error.ts

100% Statements 7/7
100% Branches 2/2
100% Functions 2/2
100% Lines 5/5
1 2 3 4 5 6 7 8 9        
import { MatchError } from "./_namespace";
 
export class RegexMatchError extends MatchError {
 
  public constructor(actualValue: any, expectedRegex: RegExp, shouldMatch: boolean) {
    super(actualValue, expectedRegex, `Expected ${JSON.stringify(actualValue)} ${!shouldMatch ? "not ": ""}to conform to ${expectedRegex}.`);
  }
}