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

Remove testUtils.failTest #486

Merged
merged 4 commits into from Jul 11, 2017
Merged

Remove testUtils.failTest #486

merged 4 commits into from Jul 11, 2017

Conversation

richvdh
Copy link
Member

@richvdh richvdh commented Jul 10, 2017

This was a helper function I wrote for testing asynchronous tests before I knew better. It turns out there are better ways of doing what it did badly:

  • using nodeify to turn promise results into nodejs-style callbacks, which is what done wants
  • or, now that we use mocha rather than jasmine, just returning a promise from the test function.

failTest obfuscates the actual source of the failure, so let's kill it off.

Automated replacement of utils.failTest with nodeify

This was done with the perl incantation:

```
    find spec -name '*.js' |
        xargs perl -i -pe 's/catch\((testUtils|utils).failTest\).done\(done\)/nodeify(done)/'
```

more auto
manual replacement of some more complicated utils.failTest usages with q.all()
invocations.
this is no longer used, so kill it
These tests which return a promise already don't need to call `done`.
@dbkr dbkr assigned richvdh and unassigned dbkr Jul 11, 2017
@dbkr dbkr merged commit e091dc0 into develop Jul 11, 2017
@richvdh richvdh deleted the rav/kill_failTest branch July 11, 2017 16:39
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 this pull request may close these issues.

None yet

2 participants