Interesting approach!
Michel de Graaf

Thanks for the feedback! We have two projects going that use the ideas I’ve described. One is a real-time collaborative memo/calendar/planning tool with and another one is a resource planning/tracing application with multiple views.

Testing depends on what do you want to achieve with it. We prefer functional/integration testing instead of unit tests.

The basic idea is that since the application state can be completely restored from the given initial state, we only have to render the application with the tested state and grep that expected components can be found from the HTML. I’m going to publish a new article about isomorphic application development later so it’ll hopefully give some insight about the technique.

If we want to test business logic the process is following:

  1. Give an initial state to the business logic component
  2. Make a public API call
  3. Check that new state object contains the wanted modifications
One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.