improved publish BDD tests, fixed jsHint warnings