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
c8fc71ee
Commit
c8fc71ee
authored
Aug 08, 2013
by
nc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add basic include path test
parent
dde391c5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
2 deletions
+23
-2
include_path.scss
test/include_path.scss
+4
-0
vars.scss
test/lib/vars.scss
+2
-0
test.js
test/test.js
+17
-2
No files found.
test/include_path.scss
0 → 100644
View file @
c8fc71ee
@import
"vars"
;
body
{
background
:
$color
;
}
\ No newline at end of file
test/lib/vars.scss
0 → 100644
View file @
c8fc71ee
$color
:
red
;
\ No newline at end of file
test/test.js
View file @
c8fc71ee
/*jshint multistr:true */
/*jshint multistr:true */
var
sass
=
require
(
'../sass'
);
var
sass
=
require
(
'../sass'
);
var
assert
=
require
(
'assert'
);
var
assert
=
require
(
'assert'
);
var
path
=
require
(
'path'
);
var
badSampleFilename
=
'sample.scss'
;
var
badSampleFilename
=
'sample.scss'
;
var
sampleFilename
=
require
(
'path'
)
.
resolve
(
__dirname
,
'sample.scss'
);
var
sampleFilename
=
path
.
resolve
(
__dirname
,
'sample.scss'
);
var
scssStr
=
'#navbar {
\
var
scssStr
=
'#navbar {
\
width: 80%;
\
width: 80%;
\
...
@@ -105,6 +105,21 @@ describe("compile scss", function() {
...
@@ -105,6 +105,21 @@ describe("compile scss", function() {
});
});
});
});
describe
(
"compile file with include paths"
,
function
(){
it
(
"should compile with render"
,
function
(
done
)
{
sass
.
render
({
file
:
path
.
resolve
(
__dirname
,
"include_path.scss"
),
includePaths
:
[
path
.
resolve
(
__dirname
,
"lib"
)],
success
:
function
(
css
)
{
done
(
assert
.
equal
(
css
,
"body {
\
n background: red; }
\
n"
));
},
error
:
function
(
error
)
{
done
(
error
);
}
})
});
});
describe
(
"compile file"
,
function
()
{
describe
(
"compile file"
,
function
()
{
it
(
"should compile with render"
,
function
(
done
)
{
it
(
"should compile with render"
,
function
(
done
)
{
sass
.
render
({
sass
.
render
({
...
...
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