Skip to content

Commit

Permalink
✅ Create test structure
Browse files Browse the repository at this point in the history
  • Loading branch information
kghugo committed Aug 4, 2020
1 parent 76f70b7 commit 10848a5
Showing 1 changed file with 47 additions and 1 deletion.
48 changes: 47 additions & 1 deletion test/inclusionLogic.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1,47 @@
// TODO
const postcss = require('postcss')
const postcssRfsAutopilot = require('../index.js')

const chai = require('chai')
const expect = chai.expect

describe('Test shouldBeTransformed()', function () {
let css

beforeEach(function () {
css = `p #hello{
font-size: 18px;
margin: rfs(10rem);
}
body{
padding: 5px;
}`
})

describe('if a value is already wrapped in rfs()', function () {
it('should not be transformed', async function (done) {
const options = {

}

const result = await postcss([
postcssRfsAutopilot(options)
]).process(css, { from: undefined }).then(result => result.css)

console.log(result)
done()
})
})

describe('if the unit of a value is not included in includedUnits', function () {
it('should not be transformed', function (done) {
done()
})
})

describe('if the unit of a value is included in excludedUnits', function () {
it('should not be transformed', function (done) {
done()
})
})
})

0 comments on commit 10848a5

Please sign in to comment.