[Sugar-devel] Unit tests in Sugar HTML

Manuel Quiñones manuq at laptop.org
Mon May 13 12:30:52 EDT 2013


2013/5/13 Daniel Narvaez <dwnarvaez at gmail.com>:
> I'm on a phone so I have not yet taken a proper look. Though it looks pretty
> cool. It seems to have custom browsers support, so it should be easy to run
> it in sugar-html-activity.
>
> We can look at hooking this up in sugar-build/buildbot, it should not be a
> lot of work.
>
> I suppose it should work for the libraries too if we just put some HTML in
> the test dir.

Yes the idea is to add unit tests in each of our libraries.  I did it
in lib/sugar-html-graphics inside clockjs code to get a first
impression, but I will move it to sugar-html-graphics repository if we
agree using Jasmine.

There is no need to add any HTML.  Just add a loader.js inside test/
with the RequireJS configuration, similar to the activity js/loader.js
.

So the proposal would be:

- start writting unit tests with Jasmine framework
- add a command to sugar-build to run the tests with Karma
- automate tests adding Karma to buildbot

--
.. manuq ..


More information about the Sugar-devel mailing list