-
Notifications
You must be signed in to change notification settings - Fork 309
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
Move serializers setup to jest config to be possible to override them #126
Conversation
], | ||
"snapshotSerializers": [ | ||
"<rootDir>/node_modules/jest-preset-angular/AngularSnapshotSerializer.js", | ||
"<rootDir>/node_modules/jest-preset-angular/HTMLCommentSerializer.js" |
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.
Shouldn't the order be different? Have you tested if that changes anything?
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.
Just tried both and seems there is no any difference. Will look how jest applies this config.
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.
I bet I've seen something about the order in jest docs, but can't find it now. Anyway, jest reverses the list:
config.snapshotSerializers
.concat()
.reverse()
.forEach(path => {
addSerializer(localRequire(path));
});
So it's same as before.
nice 👍 |
published v5.1.0 with this change |
Does this mean I can now change the config for 'pretty-format'?
…On 22 Feb 2018 08:52, "Michał Pierzchała" ***@***.***> wrote:
published v5.1.0 with this change
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#126 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AQN8ea9o-bjakntlO5pZlt9ujER0dotoks5tXSrGgaJpZM4SO4VT>
.
|
You can try this serializer that uses the default serializers (built-in plugins for Or you can write your own serializer, for example, that uses |
#125