import { transform as transformCode } from '../test-utils'; describe('error handling', () => { const transform = (code: string) => transformCode(code, { // Turn off code highlighting so snapshots are human readable. highlightCode: false, }); it('should throw a build error for a dangling combinator selector (#1751)', () => { expect(() => { transform(` import { css } from '@compiled/react'; const styles = css({ '>': { marginLeft: 10 } });
`); }).toThrow("Dangling combinator '>' in selector"); }); it('should throw when using using an invalid css node', () => { expect(() => { transform(` import '@compiled/react';