Files
node-js-test/node_modules/jest-matcher-utils
Mark 96ccf86f5c
Node.js CI Test / build (12.x) (pull_request) Failing after 6s
Node.js CI Test / build (14.x) (pull_request) Failing after 6s
Node.js CI Test / build (16.x) (pull_request) Successful in 10s
testing js app
2026-05-19 22:10:51 -07:00
..
2026-05-19 22:10:51 -07:00
2026-05-19 22:10:51 -07:00
2026-05-19 22:10:51 -07:00
2026-05-19 22:10:51 -07:00

jest-matcher-utils

This package's exports are most notably used by expect's this.utils.

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)

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