jest-expect-message icon indicating copy to clipboard operation
jest-expect-message copied to clipboard

Add custom message wrapper

Open itismoej opened this issue 2 years ago • 0 comments

What

A feature to wrap the custom message with a custom text.

Housekeeping

  • [x] Unit tests
  • [x] Documentation is up to date
  • [x] No additional lint warnings

itismoej avatar Aug 19 '21 13:08 itismoej

Hi @mjafari98 thanks for the PR, I'm not sure this is something we will want to support.

However I've just added support for disabling the custom message prefix which means you can customise the message with any wrapper you like, for example:

expect(actual, 'my custom wrapper:\n\n my custom message', { showPrefix: false }).toBe(anything)

See the new usage docs: https://github.com/mattphillips/jest-expect-message#usage

mattphillips avatar Sep 08 '22 19:09 mattphillips