import '@compiled/css-in-js';
import React from 'react';
import { render } from '@testing-library/react';
describe('css prop', () => {
it('should create css from object literal', () => {
const { getByText } = render(
hello world
);
expect(getByText('hello world')).toHaveCompiledCss('font-size', '15px');
});
it('should use string literal with identifier', () => {
const fontSize = 12;
const { getByText } = render(
hello world
);
expect(getByText('hello world')).toHaveCompiledCss('font-size', '12px');
});
it('should create css from string literal', () => {
const { getByText } = render(
hello world
);
expect(getByText('hello world')).toHaveCompiledCss('font-size', '12px');
});
it('should not type error with nested selectors', () => {
hello world
;
});
it('should create css from string', () => {
const { getByText } = render(hello world
);
expect(getByText('hello world')).toHaveCompiledCss('font-size', '12px');
});
it('should create css from object reference', () => {
const base = { fontSize: 12 };
const { getByText } = render(hello world
);
expect(getByText('hello world')).toHaveCompiledCss('font-size', '12px');
});
it('should create css from object reference in templatel literal', () => {
const base = { fontSize: 12 };
const { getByText } = render(
hello world
);
expect(getByText('hello world')).toHaveCompiledCss('font-size', '12px');
});
it('should create css from arrow func in templatel literal', () => {
const base = () => ({ fontSize: 12 });
const { getByText } = render(
hello world
);
expect(getByText('hello world')).toHaveCompiledCss('font-size', '12px');
});
it('should create css from arrow function', () => {
const base = () => ({ fontSize: 12 });
const { getByText } = render(hello world
);
expect(getByText('hello world')).toHaveCompiledCss('font-size', '12px');
});
it('should create css from array', () => {
const base = { fontSize: 12 };
const next = ` font-size: 15px; `;
const { getByText } = render(hello world
);
expect(getByText('hello world')).toHaveCompiledCss('font-size', '15px');
});
});