-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
Use BATS for tests #429
Comments
I'm looking for a small project to get oriented to nvm -- is this experiment (try porting tests to BATS) still desired? If so, I would do it on a branch in my fork. |
It's definitely still worth investigating. Any solution that can allow us to specify which shell to run tests on, to split up tests somehow, and to provide setup/teardown facility, would be worth evaluating. |
OK. I will take this on. I have a couple of plane flights coming up. ;-) |
This is currently in progress. I had some problems making Early progress can be seen on the https://github.com/smikes/nvm/tree/bats branch One useful snippet (that I will save here) is this:
This converts a tree full of urchin style tests into a file full of bats style tests, where each bats test gets the name of the urchin test-file, and the contents of each bats test are the commented-out contents of the test file. (This saves switching between source-test and target-test when porting) |
Opened a PR (#601) for review of this work. About half-done; I have ported the tests from |
Per #601 (comment), BATS is bash-specific and thus can’t work for our needs. |
As BATS is better maintained and looks nicer than Urchin, I think we should try and see if it behaves better as well.
Its from @sstephenson, which is the creator of rbenv among other things.
Installation of BATS can be done by adding the following to
.travis.yml
The text was updated successfully, but these errors were encountered: