adding unit tests using mocha and chai