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

Add something like setUp and tearDown #43

Closed
Risto-Stevcev opened this issue Apr 1, 2017 · 5 comments · Fixed by #83
Closed

Add something like setUp and tearDown #43

Risto-Stevcev opened this issue Apr 1, 2017 · 5 comments · Fixed by #83

Comments

@Risto-Stevcev
Copy link
Contributor

Add something like setUp and tearDown, something like hooks in hspec:
https://hspec.github.io/writing-specs.html

@mostalive
Copy link
Collaborator

I've been working around this by creating items that require side effects inn main, and passing them in, but that is not very sustainable - it goes messy quite quickly.

@owickstrom
Copy link
Collaborator

@mostalive I see. I'll try to find some time and implement the design discussed in #44. Would that be nicer for your usage?

@mostalive
Copy link
Collaborator

I think it would, although the fact that I have that much state is also saying something about my tests...

@owickstrom
Copy link
Collaborator

Yeah, perhaps. Do you have any example that you can share?

@mostalive
Copy link
Collaborator

(beforeEach is almost done now, and I am finally getting around to updating this, so this is more or less a note to self ;-)),
Example:

https://github.com/mostalive/purescript-firebase/blob/master/test/WriteGenericSpec.purs

 location <- entriesRef

is duplicated in multipe it's the last one isnt' so that smells of a separate describe block.

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

Successfully merging a pull request may close this issue.

3 participants