tailwindcss/__tests__/sanity.test.js
Adam Wathan e46cc65d80 Remove example class from dist build
Still want to be including this in our tests, so sanity test now runs
against a separate fixture.
2017-11-02 13:25:50 -04:00

20 lines
495 B
JavaScript

import fs from 'fs'
import path from 'path'
import postcss from 'postcss'
import tailwind from '../src/index'
/**
* Tests
*/
it('generates the right CSS', () => {
const input = fs.readFileSync(path.resolve(`${__dirname}/fixtures/tailwind-input.css`), 'utf8')
return postcss([tailwind()])
.process(input)
.then(result => {
const expected = fs.readFileSync(path.resolve(`${__dirname}/fixtures/tailwind-output.css`), 'utf8')
expect(result.css).toBe(expected)
})
})