testing pure javascript in spec