added tests with mocha & chai