Skip to content

Commit 3cde404

Browse files
committed
simple test cases
1 parent e905a13 commit 3cde404

File tree

12 files changed

+85
-2
lines changed

12 files changed

+85
-2
lines changed

.travis.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
sudo: false
2+
language: node_js
3+
node_js:
4+
- "0.10"
5+
- "0.12"
6+
- "iojs"

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# css-modulesify
22

3+
[![Build Status](https://travis-ci.org/css-modules/css-modulesify.svg?branch=master)](https://travis-ci.org/css-modules/css-modulesify)
4+
35
A browserify transform to load [CSS Modules].
46

57
[CSS Modules]: https://github.com/css-modules/css-modules

package.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,13 @@
99
"string-hash": "^1.1.0",
1010
"through": "^2.3.7"
1111
},
12-
"devDependencies": {},
12+
"devDependencies": {
13+
"browserify": "^11.0.1",
14+
"proxyquire": "^1.6.0",
15+
"tape": "^4.0.1"
16+
},
1317
"scripts": {
14-
"test": "echo \"Error: no test specified\" && exit 1"
18+
"test": "tape tests/*.js"
1519
},
1620
"author": "joshwnj",
1721
"license": "MIT",
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
._styles_2__bar {
2+
background: #BAA;
3+
}
4+
._styles_1__foo {
5+
color: #F00;
6+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
require('./styles-1.css');
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.foo {
2+
composes: bar from "./styles-2.css";
3+
color: #F00;
4+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.bar {
2+
background: #BAA;
3+
}

tests/cases/simple/expected.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
._styles__foo {
2+
color: #F00;
3+
}

tests/cases/simple/main.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
var styles = require('./styles.css');
2+
module.exports = styles;

tests/cases/simple/styles.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.foo {
2+
color: #F00;
3+
}

0 commit comments

Comments
 (0)