From 03f4a6967b42ca390f036a8264ca65284acb27d3 Mon Sep 17 00:00:00 2001 From: Michael Rienstra Date: Sat, 9 Oct 2021 10:51:29 -0700 Subject: [PATCH] docs(jest-matcher-utils): README.md (#11942) --- packages/jest-matcher-utils/README.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 packages/jest-matcher-utils/README.md diff --git a/packages/jest-matcher-utils/README.md b/packages/jest-matcher-utils/README.md new file mode 100644 index 000000000000..a43ce68473bb --- /dev/null +++ b/packages/jest-matcher-utils/README.md @@ -0,0 +1,24 @@ +# jest-matcher-utils + +This package's exports are most notably used by `expect`'s [`this.utils`](https://jestjs.io/docs/expect#thisutils). + +## Installation + +To add this package as a dependency of a project, run either of the following commands: + +- `npm install jest-matcher-utils` +- `yarn add jest-matcher-utils` + +## Exports ([src/index.ts](jest-matcher-utils/src/index.ts)) + +### Functions + +`stringify` `highlightTrailingWhitespace` `printReceived` `printExpected` `printWithType` `ensureNoExpected` `ensureActualIsNumber` `ensureExpectedIsNumber` `ensureNumbers` `ensureExpectedIsNonNegativeInteger` `printDiffOrStringify` `diff` `pluralize` `getLabelPrinter` `matcherErrorMessage` `matcherHint` + +### Types + +`MatcherHintOptions` `DiffOptions` + +### Constants + +`EXPECTED_COLOR` `RECEIVED_COLOR` `INVERTED_COLOR` `BOLD_WEIGHT` `DIM_COLOR` `SUGGEST_TO_CONTAIN_EQUAL`