Added test
jslint fixes