Add really basic/naive sanity test

This commit is contained in:
Adam Wathan 2017-10-17 08:57:44 -04:00
parent c9baf0b100
commit 7345fb04b8
2 changed files with 14216 additions and 0 deletions

File diff suppressed because it is too large Load Diff

19
__tests__/sanity.test.js Normal file
View File

@ -0,0 +1,19 @@
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}/../css/tailwind.css`), 'utf8')
return postcss([tailwind()])
.process(input)
.then(result => {
const expected = fs.readFileSync(path.resolve(`${__dirname}/fixtures/tailwind.css`), 'utf8')
expect(result.css).toBe(expected)
})
})