all files / core/errors/ function-call-match-error.ts

100% Statements 8/8
100% Branches 4/4
100% Functions 3/3
100% Lines 5/5
1 2 3 4 5 6 7 8 9     44×    
import { MatchError } from "../_errors";
 
export class FunctionCallMatchError extends MatchError {
 
  public constructor(actualValue: any, shouldMatch: boolean, args?: Array<any>) {
    super(actualValue, "function to be called", `Expected function ${!shouldMatch ? "not " : ""}to be called${args ? " with [" + args.map(arg => JSON.stringify(arg)).join(", ") + "]" : ""}.`);
  }
}