function assertThat(actual, matcher, opt_reason) {
  if (!matcher.matches(actual)) {
    // Prefix the error description with a reason from the assert
    const prefix = opt_reason ? opt_reason + ': ' : '';
    const desc = prefix + matcher.describe(actual);

    // some sort of failure here
    throw new MatcherError(desc);
  }
}
Asserts that the actual value evaluated by the matcher is true.

@param {*} actual The object to assert by the matcher.
@param {!Matcher} matcher A matcher to verify values.
@param {string=} opt_reason Description of what is asserted.