import {createTest} from '@putout/test/processor'; const test = createTest(import.meta.url, { extension: 'css', processors: ['css'], plugins: ['css'], }); test('putout: processor: css', async ({process}) => { await process('style'); }); test('putout: processor: css: style', async ({comparePlaces}) => { await comparePlaces('style', [{ message: 'Expected indentation of 8 spaces', position: { column: 5, line: 3, }, rule: '@stylistic/indentation (stylelint)', }]); }); test('putout: processor: css: align: no warnings for align', async ({comparePlaces}) => { await comparePlaces('align', []); }); test('putout: processor: css: selector-class-pattern', async ({comparePlaces}) => { await comparePlaces('selector-class-pattern', []); }); test('putout: processor: css: comparePlaces: url-quotes', async ({comparePlaces}) => { await comparePlaces('url-quotes', []); }); test('putout: processor: css: template', async ({comparePlaces}) => { await comparePlaces('template', [{ message: 'Unknown word template', position: { column: 4, line: 1, }, rule: 'CssSyntaxError (stylelint)', }]); }); test('putout: processor: css: no process: template', async ({noProcess}) => { await noProcess('template'); }); test('putout: processor: css: no places: no-descending-specificity', async ({comparePlaces}) => { await comparePlaces('no-descending-specificity', []); }); test('putout: processor: css: no places: at-rule-prelude', async ({comparePlaces}) => { await comparePlaces('at-rule-prelude', []); }); test('putout: processor: css: no places: css-apply-shorthand', async ({comparePlaces}) => { await comparePlaces('css-apply-shorthand', [{ message: 'Apply shorthand', position: { column: 8, line: 5, }, rule: 'css/apply-shorthand', }, { message: 'Expected "1px 1px 1px 1px" to be "1px"', position: { column: 13, line: 2, }, rule: 'shorthand-property-no-redundant-values (stylelint)', }]); });