Tape extension inspired by tape-jsx-equals.
Requires extend-tape.
$ npm install --save-dev @kwltrs/tape-jsx-assertions
$ npm install --save-dev extend-tape
import tape from 'tape';
import jsxAssertions from '@kwltrs/tape-jsx-assertions';
import addAssertions from 'extend-tape';
const test = addAssertions(tape, jsxAssertions);
import { createRenderer } from 'react-addons-test-utils';
import MyThingie from './MyThingie';
test('MyThingie', (t) {
const renderer = createRenderer();
renderer.render( <MyThingie /> );
const result = renderer.getRenderOutput();
t.jsxEquals(result, <div><p className='foo'>bar</p></div>);
t.jsxIncludes(result, <p className='foo'>bar</p>);
t.end();
});