What makes a good unit test?

sure, the API should be stubbed/mocked since you don’t want to test the API itself but the code processing the API result.

opening/closing divs are not subject to integration tests, if the trigger is independent (cf. jQueryUI Dialog /1/, they use unit tests to determine if an open/close action works)

/1/ - I had a closer look at them for ideas how I could test my jQueryUI plugin

1 Like