Converted whole test framework from nodeunit to mocha and chai