victor-torres / atom-hg

Mercurial support for Atom text editor. Works on Linux, Mac OS X and Windows.
https://atom.io/packages/atom-hg
MIT License
27 stars 5 forks source link

Fixing issue #19 with unit-tests #25

Closed TomKemperNL closed 8 years ago

TomKemperNL commented 8 years ago

Dear Victor,

I had noticed issue (the symptoms of) #19 when trying to use atom & mercurial together and decided to try and fix it.

Unfortunately I found the development cycle for tweaking atom-plugins to be somewhat slow, so I decided to add unit-tests (okay, okay; integration-tests).

After merging this, you should be able to run the tests by simply going: npm install npm test

This creates 2 hg test repositories and executes some simple tests against them. I've also manually confirmed that the ignored files are now indeed ignored by atom-hg.

Finally I've added Travis & AppVeyor yaml files that should run these tests automatically on both Windows or Linux (I do not have access to a Mac unfortunately). Basically (after merging to master) you should be able to create an account on https://travis-ci.org/ and https://ci.appveyor.com/, point them to your repo and it should 'just work' (fingers crossed).

You can check their status for my branch at: https://ci.appveyor.com/project/TomKemperNL/atom-hg https://travis-ci.org/TomKemperNL/atom-hg

I could not add the required badges to the readme file, since you need to specify a fork & branch to display them properly (otherwise they just display the globally latest commit, which is somewhat misleading).

Some caveats:

If the pull-request is accepted, I'll happily try and fix issue #22 next.