Skip to content

Commit

Permalink
Adds more unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mgreter committed Oct 31, 2014
1 parent 0dd2efb commit 6eec035
Show file tree
Hide file tree
Showing 10 changed files with 404 additions and 0 deletions.
11 changes: 11 additions & 0 deletions index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#navbar {
width: 80%;
height: 23px; }

#navbar ul {
list-style-type: none; }

#navbar li {
float: left; }
#navbar li a {
font-weight: bold; }
3 changes: 3 additions & 0 deletions test/functions/colorBlue.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@function colorBlue() {
@return #0000fe;
}
3 changes: 3 additions & 0 deletions test/image_path.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
body {
background-image: image-url('image.png');
}
4 changes: 4 additions & 0 deletions test/include_path.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@import "vars";
@import "colorBlue";

body { background: $color; color: colorBlue(); }
2 changes: 2 additions & 0 deletions test/included_files.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@import "sample.scss";
@import "image_path.scss";
11 changes: 11 additions & 0 deletions test/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#navbar {
width: 80%;
height: 23px; }

#navbar ul {
list-style-type: none; }

#navbar li {
float: left; }
#navbar li a {
font-weight: bold; }
1 change: 1 addition & 0 deletions test/lib/vars.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
$color: red;
30 changes: 30 additions & 0 deletions test/sample.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
exports.input = '#navbar {\
width: 80%;\
height: 23px; }\
#navbar ul {\
list-style-type: none; }\
#navbar li {\
float: left;\
a {\
font-weight: bold; }}\
@mixin keyAnimation($name, $attr, $value) {\
@-webkit-keyframes #{$name} {\
0% { #{$attr}: $value; }\
}\
}';

// Note that the bad
exports.badInput = '#navbar \n\
width: 80%';

exports.expectedRender = '#navbar {\n\
width: 80%;\n\
height: 23px; }\n\
\n\
#navbar ul {\n\
list-style-type: none; }\n\
\n\
#navbar li {\n\
float: left; }\n\
#navbar li a {\n\
font-weight: bold; }\n';
13 changes: 13 additions & 0 deletions test/sample.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#navbar {
width: 80%;
height: 23px;
}
#navbar ul {
list-style-type: none;
}
#navbar li {
float: left;
a {
font-weight: bold;
}
}
Loading

0 comments on commit 6eec035

Please sign in to comment.