-
Notifications
You must be signed in to change notification settings - Fork 304
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Serializers should be more useful #967
Comments
Another thing I'd love to see is removal of private services being printed on the element as it makes maintaining snapshots on any injection really annoying and adds nothing as far as I can think. constructor(private seoService: SeoService) {
seoService.addMeta(...)
} Ends up adding to the snapshot: <cw-root
seoService={[Function SeoService]}
> But since it's not publically available to the view then I'm not sure what it adds to show it on the host element. Currently I do: expect(fixture).toMatchSnapshot(); But maybe we should be doing (which removes the host element from the snapshot). The problem with this though is that if you do add things to the host, they won't get snapshotted/tested: expect(fixture.nativeElement).toMatchSnapshot(); |
PR is welcome:) |
馃殌 Feature Proposal
Currently all object props are serialized as Object, which do not have any sense with snapshots
Motivation
Real serializer will help to increase real coverage with tests
Example
child
parent
produce this snapshot
So instead of
current={[Function Object]}
I was hoping to see
current={ name: 'hero' }
The text was updated successfully, but these errors were encountered: