mozilla/talkilla — pull request #246 by n1k0 (2013-09-30 15:41:40+00:00)
Title: Frontend test code coverage

**This is a proposition.**

[Blanket.js](http://blanketjs.org/) is used to bring code coverage information to our frontend unit tests:

![capture decran 2013-09-30 a 17 40 27](https://f.cloud.github.com/assets/41547/1238281/b342bcc6-29e6-11e3-9313-6d946badb5b5.png)

Also, some of these data are printed out to the python frontend test runner output:

```
$ make frontend
bin/run_selenium_test.sh python -m unittest discover -v test/frontend
+ bin/selenium.sh start
Selenium server started (selenium-server-standalone-2.35.0a.jar, pid=87914)
+ set +x
+ python -m unittest discover -v test/frontend
test_addressbook_index_html (test_frontend_all.FrontEndSuite) ...
Code coverage: 90 %
ok
test_chat_index_html (test_frontend_all.FrontEndSuite) ...
Code coverage: 90.49 %
ok
test_index_html (test_frontend_all.FrontEndSuite) ...
Code coverage: 77.42 %
ok
test_port_html (test_frontend_all.FrontEndSuite) ...
Code coverage: 100 %
ok
test_sidebar_html (test_frontend_all.FrontEndSuite) ...
Code coverage: 63.82 %
ok
test_webrtc_index_html (test_frontend_all.FrontEndSuite) ...
Code coverage: 92.36 %
ok
test_worker_index_html (test_frontend_all.FrontEndSuite) ...
Code coverage: 92.36 %
ok

----------------------------------------------------------------------
Ran 7 tests in 16.206s
```

I had to refactor the way we define a `app` global object to make Blanket happy.

Feedback welcome.