In the case of .stale(UPDATE_BEFORE), you should be getting data that is up to date for that point in time. Keep in mind if you perform asynchronous inserts that you’re data might not actually have reached the server yet, make sure all insertion operations complete successfully before attempting to perform a view read. Note also that the Node.js client comes with a built in mock system that allows you to locally mock the behaviour of the client quite closely to what you would expect from a real server. Tests are an excellent use for this (and the main reason for it).
Thanks for answer! I was thinking about start using more for second layer(above pure DAO objects).
Looks like I need load all design documents into mock instance before start using it(we have couple of views).
Can you show me how this can be done from node.js?