Add javascript testing

Using jasmine for js tests.