fix tests

* fix linters call from `npm test` (jscs was not called previously)
* replace outdated nodeunit with mocha and chai
* fix linters warnings in lib and tests