mirror of
https://github.com/tailwindlabs/tailwindcss.git
synced 2025-12-08 21:36:08 +00:00
Merge pull request #184 from nothingworksinc/sanity-test
Add really basic/naive sanity test
This commit is contained in:
commit
232eeb037f
14197
__tests__/fixtures/tailwind.css
Normal file
14197
__tests__/fixtures/tailwind.css
Normal file
File diff suppressed because it is too large
Load Diff
19
__tests__/sanity.test.js
Normal file
19
__tests__/sanity.test.js
Normal 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)
|
||||
})
|
||||
})
|
||||
Loading…
x
Reference in New Issue
Block a user