tests for browser code

karma -- server and runner
karma-cli -- nice 'karma' in npm scripts
karma-phantomjs-launcher -- run headless browser
karma-chai-sinon -- get 'sinon-chai' in 'karma'
karma-mocha -- use 'mocha' to describe karma tests
chai -- get 'expect()' in karma tests
sinon -- get 'sinon.spy()' in karma tests
sinon-chai -- get 'expect(x).to.have.been.calledWith(y)' in karma tests

Signed-off-by: Sergei Ianovich <s@asutp.io>