[openstack-dev] [horizon] Packaging Sinon.JS as xstatic

Timur Sufiev tsufiev at mirantis.com
Tue Oct 7 09:19:34 UTC 2014


Hello all!

Recently I've stumbled upon wonderful Sinon.JS library [1] for stubs and
mocks in JS unit tests and found that it can be used for simplifying unit
test I've made in [2] and speeding it up. Just before wrapping it as
xstatic package I'd like to clarify 2 questions regarding Sinon.JS:

* Are Horizon folks fine with adding this dependency? Right now it will be
used just for one test, but it would be useful for anybody who wants to
mock AJAX requests in tests or emulate timeout events being fired up
(again, see very brief and concise examples at [1]).
* Is it okay to include QUnit and Jasmine adapters for Sinon.JS in the same
xstatic package? Well, personally I'd vote for including QUnit adapter [3]
since it has very little code and allows for seamless integration of
Sinon.JS with QUnit testing framework. If someone is interested in using
Jasmine matchers for Sinon [4], please let me know.

[1] http://sinonjs.org/
[2]
https://review.openstack.org/#/c/113855/2/horizon/static/horizon/tests/tables.js
[3] http://sinonjs.org/qunit/
[4] https://github.com/froots/jasmine-sinon

-- 
Timur Sufiev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20141007/af34f2df/attachment.html>


More information about the OpenStack-dev mailing list