Here's the hairiest parts to test:
Not tested:
- article.createPopup
- FIX: Function comment is insane
- Operates on inputs and returns outputs, but relies on global state, so mocking/stubbing will be needed.
- Basically a view render function. Pretty big, 60LOC
- article.createThumbnail
- 70 lines of various conditionals that determines if it should call one of the two methods below.
- Hairy stuff, desperately needs tests, it's going to take work.
- article.getOffset
- 60 lines of conditionals coupled with global state.
- Not sure how we would properly unit-test it. Hard work.
- article.getClasses
- 40 lines of conditionals composing CSS classes.
- Should be tested, but it is not easily unit-testable/understandable as it is.
- article.processPopup
- 55 lines of conditionals manipulating the com depending on global state.
- Should be tested, but it is not easily unit-testable/understandable as it is.