Open tgrecojs opened 1 month ago
from https://github.com/paralleldrive/riteway
import React from 'react';
import render from 'riteway/render-component';
import { describe } from 'riteway';
describe('renderComponent', async assert => {
const $ = render(<div className="foo">testing</div>);
assert({
given: 'some jsx',
should: 'render markup',
actual: $('.foo').html().trim(),
expected: 'testing'
});
});
Tasks
Unit tests
https://github.com/ohartman/React-Playground/blob/b20983ecc844da4067eda24d070e58505a52859b/src/image.jsx#L1-L22