add tests

Add tests using Karma, Mocha and Jasmine