src/assert.js
function assertMatch(actual, expected, message) {
  if (isRegExp(expected))
    assert(expected.test(actual), message || `Expected "${actual}" to match "${expected}"`);
  else if (typeof expected === 'function')
    assert(expected(actual), message);
  else
    assert.deepEqual(actual, expected, message);
}
function assertMatch(actual, expected, message) {
  if (isRegExp(expected))
    assert(expected.test(actual), message || `Expected "${actual}" to match "${expected}"`);
  else if (typeof expected === 'function')
    assert(expected(actual), message);
  else
    assert.deepEqual(actual, expected, message);
}
function assertMatch ( actual , expected , message ) { if ( isRegExp ( expected ) ) assert ( expected . test ( actual ) , message || ` ${ actual } ${ expected } ` ) ; else if ( typeof expected === 'function' ) assert ( expected ( actual ) , message ) ; else assert . deepEqual ( actual , expected , message ) ; }
Used to assert that actual matches expected value, where expected may be a function or a string.
Used to assert that actual matches expected value where expected may be a function or a string .