briansostudio / teamform

teamform for comp3111
0 stars 0 forks source link

Implemention of unit test about the jquery #72

Closed clementf2b closed 7 years ago

clementf2b commented 7 years ago

If I use $("div ui button").addClass(" error") in a function, how can I test it?

BrianSo commented 7 years ago

You can check the class by Element.className. See the reference.

Alternatively, You can use $(element).hasClass(clsName) to test the expected behaviour