Skip to content

WIP: reorganize and refactor client tests#654

Open
marshall007 wants to merge 1 commit intorethinkdb:nextfrom
marshall007:test-refactor
Open

WIP: reorganize and refactor client tests#654
marshall007 wants to merge 1 commit intorethinkdb:nextfrom
marshall007:test-refactor

Conversation

@marshall007
Copy link
Copy Markdown
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

Comment thread client/test/query/time.js
before(() => {
data = getData()
before(function() {
data = this.hz_data
Copy link
Copy Markdown
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
Copy Markdown
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