Hacker News new | ask | show | jobs
by joliss 5254 days ago
Jonas wrote: > The advantage is that the controller knows nothing about the DOM, so it is usable and testable without the DOM.

Jeremy wrote: > You can certainly test views that "know something" about the DOM without actually using the DOM as well...

I've been wondering for a while how to eliminate the slow and brittle Selenium layer from integration tests (perhaps I'm not the only one?). I'm thinking that if you can do away with the DOM, you might be able to somehow run the integration tests on the server, without launching a browser.

Do you have any concrete ideas how to do this, or are you only talking about unit tests in the text I quoted?

1 comments

If you move most of the application client side, you could use something like jsdom to test it. That's obviously not going to get you the same level of confidence that a full stack test in a real browser would though. Maybe a combination of the two?