import React from 'react';
import { render } from '@testing-library/react';
import { styled } from '@compiled/css-in-js';
describe('browser', () => {
it('should not render styles inline', () => {
const StyledDiv = styled.div`
font-size: 12px;
`;
const { getByText } = render(hello world);
expect(getByText('hello world').outerHTML).toMatchInlineSnapshot(
`"
hello world
"`
);
});
it('should only render one style block to the head if its already been moved', () => {
const StyledDiv = styled.div`
font-size: 12px;
`;
render(
<>
hello world
hello world
>
);
expect(document.head.innerHTML).toMatchInlineSnapshot(
`""`
);
});
});