mantrajs / mantra-sample-blog-app

A sample blog app built with Mantra
http://mantra-sample-blog-app.herokuapp.com/
MIT License
296 stars 104 forks source link

No need to hide preventDefault for tests when using jsdom #83

Closed avin closed 8 years ago

xcv58 commented 8 years ago

This'll change the route on real browser.

xcv58 commented 8 years ago

In other words, the preventDefault is not for tests. Because submitting a form will change the url, which is not an intent. So we use preventDefault here.

avin commented 8 years ago

yup, sorry! only conditions must be removed

xcv58 commented 8 years ago

@avin We cannot remove conditions because jsdom can not get event. The related tests will fail if you remove the conditions.