import React from 'react';
import { render } from '@testing-library/react';
import { CodeBlock } from '../CodeBlock';
import { CodeBlockAction } from '../CodeBlockAction';
import { CodeBlockCode } from '../CodeBlockCode';
test('CodeBlock renders successfully', () => {
const { asFragment } = render(test text);
expect(asFragment()).toMatchSnapshot();
});
test('CodeBlockAction renders successfully', () => {
const { asFragment } = render(action);
expect(asFragment()).toMatchSnapshot();
});
test('CodeBlockCode renders successfully', () => {
const { asFragment } = render(action);
expect(asFragment()).toMatchSnapshot();
});
test('CodeBlock with components renders successfully', () => {
const { asFragment } = render(
button}>
inside pre/code tags
test outer text
);
expect(asFragment()).toMatchSnapshot();
});