Fixed #1 - Fixed the whatsnew-** script for loading release notes into builds
Added test to ensure that release notes are parsed properly Updated to latest dependencies to fix security vulnerability Updated GH Actions Workflow to run test before updating tag Updated README.md to reflect proper whatsnew documentation.
This commit is contained in:
48
node_modules/jest-jasmine2/build/assertionErrorMessage.js
generated
vendored
48
node_modules/jest-jasmine2/build/assertionErrorMessage.js
generated
vendored
@@ -61,27 +61,30 @@ const operatorMessage = operator => {
|
||||
};
|
||||
|
||||
const assertThrowingMatcherHint = operatorName =>
|
||||
_chalk.default.dim('assert') +
|
||||
_chalk.default.dim('.' + operatorName + '(') +
|
||||
_chalk.default.red('function') +
|
||||
_chalk.default.dim(')');
|
||||
operatorName
|
||||
? _chalk.default.dim('assert') +
|
||||
_chalk.default.dim('.' + operatorName + '(') +
|
||||
_chalk.default.red('function') +
|
||||
_chalk.default.dim(')')
|
||||
: '';
|
||||
|
||||
const assertMatcherHint = (operator, operatorName) => {
|
||||
let message =
|
||||
_chalk.default.dim('assert') +
|
||||
_chalk.default.dim('.' + operatorName + '(') +
|
||||
_chalk.default.red('received') +
|
||||
_chalk.default.dim(', ') +
|
||||
_chalk.default.green('expected') +
|
||||
_chalk.default.dim(')');
|
||||
const assertMatcherHint = (operator, operatorName, expected) => {
|
||||
let message = '';
|
||||
|
||||
if (operator === '==') {
|
||||
message +=
|
||||
' or ' +
|
||||
if (operator === '==' && expected === true) {
|
||||
message =
|
||||
_chalk.default.dim('assert') +
|
||||
_chalk.default.dim('(') +
|
||||
_chalk.default.red('received') +
|
||||
_chalk.default.dim(') ');
|
||||
_chalk.default.dim(')');
|
||||
} else if (operatorName) {
|
||||
message =
|
||||
_chalk.default.dim('assert') +
|
||||
_chalk.default.dim('.' + operatorName + '(') +
|
||||
_chalk.default.red('received') +
|
||||
_chalk.default.dim(', ') +
|
||||
_chalk.default.green('expected') +
|
||||
_chalk.default.dim(')');
|
||||
}
|
||||
|
||||
return message;
|
||||
@@ -103,8 +106,7 @@ function assertionErrorMessage(error, options) {
|
||||
|
||||
if (operatorName === 'doesNotThrow') {
|
||||
return (
|
||||
assertThrowingMatcherHint(operatorName) +
|
||||
'\n\n' +
|
||||
buildHintString(assertThrowingMatcherHint(operatorName)) +
|
||||
_chalk.default.reset(`Expected the function not to throw an error.\n`) +
|
||||
_chalk.default.reset(`Instead, it threw:\n`) +
|
||||
` ${(0, _jestMatcherUtils.printReceived)(actual)}` +
|
||||
@@ -117,8 +119,7 @@ function assertionErrorMessage(error, options) {
|
||||
|
||||
if (operatorName === 'throws') {
|
||||
return (
|
||||
assertThrowingMatcherHint(operatorName) +
|
||||
'\n\n' +
|
||||
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(
|
||||
@@ -129,8 +130,7 @@ function assertionErrorMessage(error, options) {
|
||||
}
|
||||
|
||||
return (
|
||||
assertMatcherHint(operator, operatorName) +
|
||||
'\n\n' +
|
||||
buildHintString(assertMatcherHint(operator, operatorName, expected)) +
|
||||
_chalk.default.reset(`Expected value ${operatorMessage(operator)}`) +
|
||||
` ${(0, _jestMatcherUtils.printExpected)(expected)}\n` +
|
||||
_chalk.default.reset(`Received:\n`) +
|
||||
@@ -141,5 +141,9 @@ function assertionErrorMessage(error, options) {
|
||||
);
|
||||
}
|
||||
|
||||
function buildHintString(hint) {
|
||||
return hint ? hint + '\n\n' : '';
|
||||
}
|
||||
|
||||
var _default = assertionErrorMessage;
|
||||
exports.default = _default;
|
||||
|
||||
Reference in New Issue
Block a user