jeudi 28 juillet 2016

What are the steps to unit test jquery plugins

I'm attempting to write some basic unit tests for a jquery plugin. However, I do not know how to write unit tests for functions that are tightly coupled with the DOM and sometimes run for a few dozen lines.

It is a simple interactive checklist:

https://h5p.org/summary

The code is quite short (480 lines):

http://ift.tt/2asAFL2

A sample function from the codebase that I am trying to write a test for:

http://ift.tt/2adV9dW

Aucun commentaire:

Enregistrer un commentaire