Hello, I wrote this handy little library for testing purposes: you can extract the vdom from a React
component and test it against a JSON with simple tools like assert.deepEqual() and without a real DOM.
The extracted vdom has the following type definition:<p><pre><code> type Node = {
tag: string,
attrs: object<name, value>,
children: undefined | null | Node | Array<Node>
}
</code></pre>
If your component handle a private state, you can inject a state to test different configurations.<p>This is an example of massive use in a form generation library:<p><a href="https://github.com/gcanti/tcomb-form/blob/master/test/test.js" rel="nofollow">https://github.com/gcanti/tcomb-form/blob/master/test/test.j...</a><p>Hope it can help you too.