| | |
| | | if (operatorName === 'doesNotThrow') { |
| | | return ( |
| | | buildHintString(assertThrowingMatcherHint(operatorName)) + |
| | | _chalk.default.reset(`Expected the function not to throw an error.\n`) + |
| | | _chalk.default.reset(`Instead, it threw:\n`) + |
| | | _chalk.default.reset('Expected the function not to throw an error.\n') + |
| | | _chalk.default.reset('Instead, it threw:\n') + |
| | | ` ${(0, _jestMatcherUtils.printReceived)(actual)}` + |
| | | _chalk.default.reset( |
| | | hasCustomMessage ? '\n\nMessage:\n ' + message : '' |
| | |
| | | if (operatorName === 'throws') { |
| | | return ( |
| | | buildHintString(assertThrowingMatcherHint(operatorName)) + |
| | | _chalk.default.reset(`Expected the function to throw an error.\n`) + |
| | | _chalk.default.reset(`But it didn't throw anything.`) + |
| | | _chalk.default.reset('Expected the function to throw an error.\n') + |
| | | _chalk.default.reset("But it didn't throw anything.") + |
| | | _chalk.default.reset( |
| | | hasCustomMessage ? '\n\nMessage:\n ' + message : '' |
| | | ) + |
| | |
| | | buildHintString(assertMatcherHint(operator, operatorName, expected)) + |
| | | _chalk.default.reset(`Expected value ${operatorMessage(operator)}`) + |
| | | ` ${(0, _jestMatcherUtils.printExpected)(expected)}\n` + |
| | | _chalk.default.reset(`Received:\n`) + |
| | | _chalk.default.reset('Received:\n') + |
| | | ` ${(0, _jestMatcherUtils.printReceived)(actual)}` + |
| | | _chalk.default.reset(hasCustomMessage ? '\n\nMessage:\n ' + message : '') + |
| | | (diffString ? `\n\nDifference:\n\n${diffString}` : '') + |