Skip to content

Conversation

@maraisr
Copy link
Contributor

@maraisr maraisr commented Jul 3, 2019

Off the back of what @kentcdodds is doing over at https://github.com/testing-library/jest-dom and its simple:

// jest.config.js module.exports = { setupFilesAfterEnv: [ require.resolve('jest-dom/extend-expect'), ], }

I aim to introduce something similar to that, that would alleviate the need for a jest setup file.

Which will allow:

// jest.config.js module.exports = { setupFilesAfterEnv: [ require.resolve('snapshot-diff/extend-expect'), ], }

Or this at the top of the spec file:

import 'snapshot-diff/extend-expect';
Copy link
Member

@thymikee thymikee left a comment

Choose a reason for hiding this comment

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

Sure, why not. Thanks!

@thymikee
Copy link
Member

thymikee commented Jul 3, 2019

Can you update the docs as well?

@thymikee thymikee merged commit 8cc8f70 into jest-community:master Jul 3, 2019
@maraisr maraisr deleted the feature/expect-extend branch July 3, 2019 07:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants