draft-js-utils icon indicating copy to clipboard operation
draft-js-utils copied to clipboard

Update expect

Open mxstbr opened this issue 6 years ago • 3 comments

This makes writing and debugging tests so much nicer as the error messages are a million times better, especially for nested objects.

mxstbr avatar Feb 05 '19 13:02 mxstbr

Oops, it turns out that expect v1.x was a totally different package back in 2016. Then this package name got donated to Jest which has taken over it since v21.

According to this page, you can use jest-codemods to automatically migrate the old tests using [email protected] to the new jest version of expect.

If you want to do that, I'll be open to the change.

sstur avatar Feb 07 '19 03:02 sstur

In that case, it might be worth just upgrading jest and using the built-in expect instead of only upgrading this dep?!

mxstbr avatar Feb 07 '19 11:02 mxstbr

Right, but that would effectively be the same thing (expect that you linked to in package.json is exactly the one that's packaged within Jest). So we'd still need to run the codemod. Which I'm fine with.

sstur avatar Feb 08 '19 00:02 sstur