Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
node-sass
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
楚学文
node-sass
Commits
1ab7f9b7
Commit
1ab7f9b7
authored
Dec 02, 2012
by
Sam Saccone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add real tests!
parent
60f66275
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
1 deletions
+47
-1
package.json
package.json
+2
-1
test.js
test/test.js
+45
-0
No files found.
package.json
View file @
1ab7f9b7
...
@@ -10,7 +10,8 @@
...
@@ -10,7 +10,8 @@
"url"
:
"git://github.com/andrew/node-sass.git"
"url"
:
"git://github.com/andrew/node-sass.git"
},
},
"scripts"
:
{
"scripts"
:
{
"install"
:
"node rebuild.js"
"install"
:
"node rebuild.js"
,
"test"
:
"mocha test"
},
},
"gypfile"
:
true
,
"gypfile"
:
true
,
"engines"
:
{
"engines"
:
{
...
...
test/test.js
0 → 100644
View file @
1ab7f9b7
var
sass
=
require
(
'../sass'
);
var
assert
=
require
(
'assert'
);
var
scssStr
=
'#navbar {
\
width: 80%;
\
height: 23px; }
\
#navbar ul {
\
list-style-type: none; }
\
#navbar li {
\
float: left;
\
a {
\
font-weight: bold; }}'
;
var
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'
;
describe
(
"compile scss"
,
function
()
{
it
(
"should compile"
,
function
(
done
)
{
sass
.
render
(
scssStr
,
function
(
err
,
css
)
{
done
(
err
);
});
});
it
(
"should match compiled string"
,
function
(
done
)
{
sass
.
render
(
scssStr
,
function
(
err
,
css
)
{
if
(
!
err
)
{
done
(
assert
.
equal
(
css
,
expectedRender
));
}
else
{
done
(
err
);
}
});
});
});
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment