Javascript test refactor / improve coverage

Removed a couple of unused methods on DoughBaseComponent
Added some coverage
Reduced duplication in tests
Can you remove the spaces after `function ()` parentheses?