remove js comments
Reduce duplicate code in tests