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

WIP: reorganize and refactor client tests #654

Open
wants to merge 1 commit into
base: next
Choose a base branch
from

Conversation

marshall007
Copy link
Contributor

@marshall007 marshall007 commented Jul 20, 2016

  • Organize tests into sane folder structure.
  • Tests should avoid setting and/or depending on global state.

This change is Reviewable

before(() => {
data = getData()
before(function() {
data = this.hz_data
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we were not using arrow functions (which capture lexical scope) in all of our it assertions, we could reference this.hz_data and/or this.horizon in all our tests directly. This is unfortunate. Down the road it may be worth avoiding arrow functions in the tests so we can more easily manage their context and further avoid referencing things out of scope.

@deontologician
Copy link
Contributor

This will likely fix #316

Looks awesome btw

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

Successfully merging this pull request may close these issues.

2 participants