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

Write tests #10

Open
mr opened this issue Feb 28, 2017 · 2 comments
Open

Write tests #10

mr opened this issue Feb 28, 2017 · 2 comments

Comments

@mr
Copy link
Owner

mr commented Feb 28, 2017

Don't know how to test this since it's like entirely IO and making sockets and stuff. But some tests would be nice.

@senofsky
Copy link

Do you have any ideas on how to implement this?
I recently went through https://functor.tokyo/blog/2015-11-20-testing-db-access and thought it may be applicable.
I'd like to help if you'd be willing.

@mr
Copy link
Owner Author

mr commented May 26, 2020

I did actually write one test here: https://github.com/mr/ftp-client/blob/master/ftp-client/test/test.hs

Basically I have a handle that performs the important IO actions and the tests use a special implementation that doesn't do anything aside from record how it's called and return predetermined responses. It would be nice if this was more robust but I don't know if there's a more general solution out there. In the meantime maybe there's a way to clean that up and just write more use cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants