Permalink
Browse files

test

  • Loading branch information...
1 parent 61b2c14 commit 4892eeb09073bd9a25f9c18461bd96411e0bce7c @morishitter committed Aug 4, 2015
Showing with 23 additions and 4 deletions.
  1. +0 −1 .gitignore
  2. +3 −1 package.json
  3. +6 −2 test/index.js
  4. +7 −0 test/input.css
  5. +7 −0 test/output.css
View
@@ -1,3 +1,2 @@
node_modules
npm-debug.log
-sample.css
View
@@ -25,5 +25,7 @@
"minimist": "^1.1.2",
"postcss": "^4.1.16"
},
- "devDependencies": {}
+ "devDependencies": {
+ "tape": "^4.0.2"
+ }
}
View
@@ -1,6 +1,10 @@
+var fs = require('fs')
var test = require('tape')
var cssfmt = require('..')
-test('description', function (t) {
- t.end()
+test('fmt', function (t) {
+ var input = 'test/input.css'
+ var expected = fs.readFileSync('test/output.css', 'utf-8')
+ t.equal(cssfmt(input).toString(), expected)
+ t.end()
})
View
@@ -0,0 +1,7 @@
+@media screen and (min-width: 699px) {
+ .foo+ .bar,
+.hoge ~ .fuga>p {
+ color:red;
+ padding : 10px;
+}
+ }
View
@@ -0,0 +1,7 @@
+@media screen and (min-width: 699px) {
+ .foo + .bar,
+ .hoge ~ .fuga > p {
+ color: red;
+ padding: 10px;
+ }
+}

0 comments on commit 4892eeb

Please sign in to comment.