Closed danielfalk closed 9 years ago
Hey!
Super suggestion! Thanks! Would you mind adding tests too akin to the ones it should already have? If not, let me know and I'll do so myself before merging.
Cheers
It's been a while since I last hacked this. Wasn't suffixesadd
for opening files without typing the suffix in? I'm not 100% sure it's the right thing to edit to get Node.vim initialized for those other types. If that was what you were after. Anywho that's what automated tests are for. To answer those questions. ^_^
I'm not all that familiar with ruby, but I tried to follow your lead. I'm also not sure if they pass, since I'm not quite sure how to run the suite?
I updated the pull request.
Thanks!
You should be able to run the tests with make test
after running bundle install
.
Are you using some require
extension in Node.js too? I'm thinking Node itself won't be able to find .es
files otherwise, right?
Yes, I am currently using babel (a.k.a., 6to5) to extend require. There is also node-jsx which does a similar thing.
I figured out how to install bundle, and ran bundle install
, which worked ok. But when I run make test
, I see this:
/usr/lib/ruby/gems/2.2.0/gems/ansi-1.4.3/lib/ansi/chart.rb:26: warning: duplicated key at line 29 ignored: :concealed
/home/dan/.bundler/ruby/2.2.0/vimrunner-4b1ee072e52d/lib/vimrunner/platform.rb:25:in `vim': No suitable Vim executable could be found for this system. (Vimrunner::NoSuitableVimError)
from /home/dan/.bundler/ruby/2.2.0/vimrunner-4b1ee072e52d/lib/vimrunner/server.rb:37:in `block in initialize'
from /home/dan/.bundler/ruby/2.2.0/vimrunner-4b1ee072e52d/lib/vimrunner/server.rb:37:in `fetch'
from /home/dan/.bundler/ruby/2.2.0/vimrunner-4b1ee072e52d/lib/vimrunner/server.rb:37:in `initialize'
from /home/dan/checkouts/dotfiles/vim/bundle/vim-node/test/helper.rb:15:in `new'
from /home/dan/checkouts/dotfiles/vim/bundle/vim-node/test/helper.rb:15:in `<top (required)>'
from /home/dan/checkouts/dotfiles/vim/bundle/vim-node/test/autoload/lib_test.rb:1:in `require_relative'
from /home/dan/checkouts/dotfiles/vim/bundle/vim-node/test/autoload/lib_test.rb:1:in `<top (required)>'
from -e:1:in `require'
Makefile:14: recipe for target 'spec' failed
make: *** [spec] Error 1
But vim is in my path. if I run which vim
, I get: /usr/bin/vim
.
Hmm. Never could figure out how to run the tests, but Travis CI ran the tests in the pull request and it appears they passed :-) So it should be good to go, right? Or are there other tests you'd like to see?
Sorry for having you spend time on testing when it turned out suffixesadd
fulfilled the need for now.
Thank you again for caring!
This adds some extensions that can be used for es6 modules: (es, es6) as well as react components (jsx)