refactoring common func into index.js from lib/mocha.js
Merge branch 'master' of github.com:gilt/gilt-swig