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 socket.io 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:
- Give an initial state to the business logic component
- Make a public API call
- Check that new state object contains the wanted modifications