* adding more tests - covers article.jsx and elements created from its props and state - added png as static file that needs stubbing * video + channelDetails test coverage * chat + channels tests * channels cc refactor * yarn install * update snapshot and string spacing * chat.jsx test mostly tests rendering elements - does not test imported components, as those are already tested separately - does not imported functions from actions or utils as those will be tested separately as well * cleaning up - mocked response with flush promises for state/component to reflect appropriate changes * snapshot updates
14 lines
381 B
JavaScript
14 lines
381 B
JavaScript
import { h } from 'preact';
|
|
import render from 'preact-render-to-json';
|
|
import CodeEditor from '../codeEditor';
|
|
|
|
const getCodeEditor = () => (
|
|
<CodeEditor activeChannelId={12345} pusherKey="ASDFGHJKL" />
|
|
);
|
|
|
|
describe('<CodeEditor />', () => {
|
|
it('should render and test snapshot', () => {
|
|
const tree = render(getCodeEditor());
|
|
expect(tree).toMatchSnapshot();
|
|
});
|
|
});
|