changed unit test to mocha & chai