Creating a functional test using mocha