Fixed JSHint errors in test code