spec/helpers/SpecHelper.js
function (/*util*/) {

      function compare(actual, expected) {
        return {
          pass: actual instanceof Error && ('' + actual).indexOf(expected) >= 0
        }
      }

      return {compare: compare}
    }
function (/*util*/) {

      function compare(actual, expected) {
        return {
          pass: actual instanceof Error && ('' + actual).indexOf(expected) >= 0
        }
      }

      return {compare: compare}
    }
function ( /*util*/ ) { function compare ( actual , expected ) { return { pass : actual instanceof Error && ( '' + actual ) . indexOf ( expected ) >= 0 } } return { compare : compare } }
actual has to be an Error instance, and contain the expected string
actual has to be an Error instance and contain the expected string