-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add serializer file #777
add serializer file #777
Conversation
packages/jest-emotion/serializer.js
Outdated
@@ -0,0 +1,4 @@ | |||
const { createSerializer } = require('./dist') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you change this to requiring jest-emotion
instead of ./dist
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting! Will that work!?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, node should look in the node_modules folder, go into the jest-emotion folder and look at the main property in the package.json.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!!
Thanks @kentcdodds |
Awesome! just what I needed! |
What: This adds a root-level
serializer.js
fileWhy: It will make it much easier to use this package for the common use-case. People will be able to configure the serializer using the
snapshotSerializers
config:How: Created a new file called
serializer.js
in the root of the project that simply creates the serializer as documented.Checklist: