Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return (actual: ElementFinder) =>
and(...this.expectations).answeredBy(actor)(actual).then(_ => _ instanceof ExpectationMet
? new ExpectationMet(this.message, _.expected, _.actual)
: new ExpectationNotMet(_.message, _.expected, _.actual));
}