Integrated with Testem and added test for callback

Have added a unit test for the callback functionality, and have amended the unit tests to work both with Testem and in the browser