Skip to content
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

Snapshot testing #13

Closed
zenangst opened this issue Sep 6, 2020 · 3 comments
Closed

Snapshot testing #13

zenangst opened this issue Sep 6, 2020 · 3 comments
Assignees
Labels
discussion Further information is requested

Comments

@zenangst
Copy link
Owner

zenangst commented Sep 6, 2020

I've grown rather fond of snapshot tests lately and we might want to consider including http://github.com/pointfreeco/swift-snapshot-testing on the unit test target so that we can rely on their dump-based asserts when writing our tests.

And it goes without saying that we should use it for the ViewKit target to get snapshots of views and windows. I think that could be achieved by simply loading the _previews and creating a snapshot from a NSHostingController.

@zenangst zenangst added the discussion Further information is requested label Sep 6, 2020
@vadymmarkov
Copy link
Collaborator

Yes, this is a good idea!

@zenangst
Copy link
Owner Author

zenangst commented Sep 6, 2020

It supports SPM so I think we should go ahead and try and include it as a dependency.
I think #14 could benefit from using snapshot testing.

@zenangst
Copy link
Owner Author

zenangst commented Sep 7, 2020

This is fixed in #16

@zenangst zenangst closed this as completed Sep 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Further information is requested
Projects
Brainstorming
  
Awaiting triage
Development

No branches or pull requests

2 participants