Skip to content

Update expect#166

Open
mxstbr wants to merge 1 commit into
sstur:masterfrom
mxstbr:update-expect
Open

Update expect#166
mxstbr wants to merge 1 commit into
sstur:masterfrom
mxstbr:update-expect

Conversation

@mxstbr

@mxstbr mxstbr commented Feb 5, 2019

Copy link
Copy Markdown
Collaborator

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

@sstur sstur left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Just needs a quick rebase

Edit: There's a problem. Described below.

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

sstur commented Feb 7, 2019

Copy link
Copy Markdown
Owner

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 expect@1.x to the new jest version of expect.

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

@mxstbr

mxstbr commented Feb 7, 2019

Copy link
Copy Markdown
Collaborator Author

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

@sstur

sstur commented Feb 8, 2019

Copy link
Copy Markdown
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants