refactor(jshint): reduce duplication & test all JS files