matchesExpected(tags) {
    const eTags = expectedErrorTags(tags)

    return (
      // Check that all errors are matched by a tag
      this.errors.reduce((allErrsMatched, err) => allErrsMatched && (
        eTags.reduce((anyTagMatch, tag) => anyTagMatch || EXPECTED_ERROR_PREDICATES[tag](err), false)
      ), true)
      &&
      // Check that all tags match an error
      eTags.reduce((allTagsMatch, tag) => allTagsMatch && (
        this.errors.reduce((anyErrMatched, err) => anyErrMatched || EXPECTED_ERROR_PREDICATES[tag](err), false)
      ), true)
    )
  }
// Determine whether the given tag array corresponds to this' errors.
Determine whether the given tag array corresponds to this' errors.
Determine whether the given tag array corresponds to this ' errors .
matchesExpected(tags) {
    const eTags = expectedErrorTags(tags)
    return (
      this.errors.reduce((allErrsMatched, err) => allErrsMatched && (
        eTags.reduce((anyTagMatch, tag) => anyTagMatch || EXPECTED_ERROR_PREDICATES[tag](err), false)
      ), true)
      &&
      eTags.reduce((allTagsMatch, tag) => allTagsMatch && (
        this.errors.reduce((anyErrMatched, err) => anyErrMatched || EXPECTED_ERROR_PREDICATES[tag](err), false)
      ), true)
    )
  }
matchesExpected ( tags ) { const eTags = expectedErrorTags ( tags ) return ( this . errors . reduce ( ( allErrsMatched , err ) => allErrsMatched && ( eTags . reduce ( ( anyTagMatch , tag ) => anyTagMatch || EXPECTED_ERROR_PREDICATES [ tag ] ( err ) , false ) ) , true ) && eTags . reduce ( ( allTagsMatch , tag ) => allTagsMatch && ( this . errors . reduce ( ( anyErrMatched , err ) => anyErrMatched || EXPECTED_ERROR_PREDICATES [ tag ] ( err ) , false ) ) , true ) ) }
Determine whether the given tag array corresponds to this' errors.
Determine whether the given tag array corresponds to this ' errors .
// Check that all errors are matched by a tag // Check that all tags match an error