Extract ReactTest helper, clean up example react.js test