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 #13

Open
mitchellwrosen opened this issue Jul 21, 2016 · 0 comments
Open

Write tests #13

mitchellwrosen opened this issue Jul 21, 2016 · 0 comments

Comments

@mitchellwrosen
Copy link
Collaborator

mitchellwrosen commented Jul 21, 2016

This app is very IO-heavy and side-effecty. Would be nice to refactor it to write some pure tests, be able to feed in pure (mocked) filesystem events, and stuff like that.

Some simple high-level properties to test:

  • The same job should not be enqueued twice (so e.g. saving multiple times in succession will not each trigger a separate unit test run)
  • A job identical to the one currently running should cause it to be canceled and restarted

Then there's all the untested IO ugliness:

  • Filesystem oddities (dead symlinks, permission errors, etc)
  • Failed spawned processes, or rogue processes that don't even respond to SIGINT (not sure if Haskell can do anything about these at all)
  • Async exceptions handling
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

1 participant