Skip to content

Commit 2aa5d7e

Browse files
committed
test(@putout/engine-processor) coverage
1 parent 7840574 commit 2aa5d7e

3 files changed

Lines changed: 35 additions & 0 deletions

File tree

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
html {
2+
height: 94%;
3+
}
4+
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
html {
2+
height: 94%;
3+
}
4+

packages/engine-processor/test/processor.js

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,3 +380,30 @@ test('putout: processor: yaml: duplicate', async (t) => {
380380
t.end();
381381
});
382382

383+
test('putout: processor: css', async (t) => {
384+
const name = 'style';
385+
const inputName = join(__dirname, 'fixture', `${name}.css`);
386+
const outputName = join(__dirname, 'fixture', `${name}-fix.css`);
387+
388+
const rawSource = await readFile(inputName, 'utf8');
389+
const output = await readFile(outputName, 'utf8');
390+
const options = {
391+
processors: [
392+
'css',
393+
],
394+
};
395+
396+
const fix = true;
397+
const {processedSource} = await runProcessors({
398+
fix,
399+
name: inputName,
400+
processFile: processFile({
401+
fix,
402+
}),
403+
options,
404+
rawSource,
405+
});
406+
407+
t.equal(processedSource, output);
408+
t.end();
409+
});

0 commit comments

Comments
 (0)