core/api/tailwindcss-master/__tests__/cli.compile.test.js

20 lines
572 B
JavaScript
Raw Normal View History

2022-12-11 13:55:49 +05:00
import path from 'path'
import autoprefixer from 'autoprefixer'
import tailwind from '../src'
import compile from '../src/cli/compile'
describe('cli compile', () => {
const inputFile = path.resolve(__dirname, 'fixtures/tailwind-input.css')
const outputFile = 'output.css'
const plugins = [tailwind(), autoprefixer]
it('compiles CSS file', () => {
return compile({ inputFile, outputFile, plugins }).then((result) => {
expect(result.css).toContain('.example')
expect(result.css).toContain('-webkit-max-content')
})
})
})