kazazor / git-pre-commit

A pre-commit hook that ignores all the unstagged changes while performing the pre-commit command you wrote (Using Shell, Gulp, Grunt etc..)
https://www.npmjs.com/package/git-pre-commit
MIT License
18 stars 5 forks source link

Add tests to the tests/hooks.test.js + tests/git-manager.test.js file - mocha #12

Open kazazor opened 8 years ago

kazazor commented 8 years ago

Test cases - tests/hooks.test.js:

  1. all of the pre-commit hook files are being copied as planned
  2. all of the pre-commit hook files are added with the permission to execute (chmod 755)
  3. existing pre-commit hook is being deleted when installing the package

Test cases - tests/git-manager.test.js:

  1. Check that initializing the singleton instance sets the right git root directory

Using:

  1. gulp-mocha
  2. Write the tests using mocha