GlobeTownDevs / stopwatch

Stopping your watches
0 stars 1 forks source link

Half of the tests are about DOM manipulation #9

Open marisid opened 8 years ago

marisid commented 8 years ago

Quite many of your tests are about DOM manipulation. It would be maybe quicker but still effective to add the HTML features through your HTML document directly and do some QA testing how elements render on the page. As we understand it, unit tests are more about testing logic rather than DOM rendering. But great that you practiced DOM testing through Qunit.

njsfield commented 8 years ago

Ah yeah, we was unsure about the necessity/value of tests on DOM manipulation, good shout! We wanted to keep tests to ensure that if anything failed to display in the browser, tests would assert that it was a fault with the application logic and not the initial set up.

Also, as the application grew, we wanted to add features to manipulate attributes of elements (e.g. button disabled), so we needed initial tests to ensure these elements were present (and had correct ID's set up) in the DOM