Appendix B. How jQuery UI tests jQuery UI
To verify that the various features of jQuery UI work as intended, the library has a series of unit tests that run in all the library’s supported browsers. The tests themselves are written using the QUnit testing library. Because several excellent QUnit tutorials are online (http://qunitjs.com/cookbook/ is a particularly good one), I won’t give one here. Instead, I’ll show how jQuery UI tests its own widgets, using examples directly from the jQuery UI source code. Hopefully, looking at how jQuery UI tests its own widgets will help you approach testing yours.
B.1. Testing options
jQuery UI attempts to test every potential value of every option for every widget. Although the test coverage isn’t perfect, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access