2017-01-24 20:20:25 +00:00
|
|
|
const test = require('ava')
|
|
|
|
const fs = require('fs')
|
|
|
|
const path = require('path')
|
2016-12-01 13:00:06 +00:00
|
|
|
|
2017-01-24 20:20:25 +00:00
|
|
|
let dist = path.join(__dirname, '../../dist')
|
2016-12-01 13:00:06 +00:00
|
|
|
|
|
|
|
test.before('`dist` path should be created', t => {
|
2017-01-24 20:20:25 +00:00
|
|
|
t.true(fs.lstatSync(dist).isDirectory())
|
|
|
|
})
|
2016-12-01 13:00:06 +00:00
|
|
|
|
|
|
|
test('`milligram.css` should be created', t => {
|
|
|
|
fs.readdirSync(dist).map(file => {
|
2017-01-24 20:20:25 +00:00
|
|
|
if (file === 'milligram.css') t.is(file, 'milligram.css')
|
|
|
|
})
|
|
|
|
})
|
2016-12-01 13:00:06 +00:00
|
|
|
|
|
|
|
test('`milligram.min.css` should be created', t => {
|
|
|
|
fs.readdirSync(dist).map(file => {
|
2017-01-24 20:20:25 +00:00
|
|
|
if (file === 'milligram.min.css') t.is(file, 'milligram.min.css')
|
|
|
|
})
|
|
|
|
})
|
2016-12-01 13:00:06 +00:00
|
|
|
|
|
|
|
test('`milligram.css.map` should be created', t => {
|
|
|
|
fs.readdirSync(dist).map(file => {
|
2017-01-24 20:20:25 +00:00
|
|
|
if (file === 'milligram.css.map') t.is(file, 'milligram.css.map')
|
|
|
|
})
|
|
|
|
})
|
2016-12-01 13:00:06 +00:00
|
|
|
|
|
|
|
test('`milligram.min.css.map` should be created', t => {
|
|
|
|
fs.readdirSync(dist).map(file => {
|
2017-01-24 20:20:25 +00:00
|
|
|
if (file === 'milligram.min.css.map') t.is(file, 'milligram.min.css.map')
|
|
|
|
})
|
|
|
|
})
|