Fix channel test
Fix jshint warnings