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
d10f348e
Commit
d10f348e
authored
Nov 11, 2014
by
Kevin Mårtensson
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #533 from kevva/test-clean
Cleanup tests
parents
33fb8aa4
65234da8
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
20 deletions
+11
-20
api.js
test/api.js
+11
-20
No files found.
test/api.js
View file @
d10f348e
...
@@ -182,28 +182,25 @@ describe('api', function() {
...
@@ -182,28 +182,25 @@ describe('api', function() {
});
});
});
});
it
(
'should contain an array of all included files in stats when data is passed'
,
function
(
done
)
{
it
(
'should contain all included files in stats when data is passed'
,
function
(
done
)
{
var
src
=
fixture
(
'include-files/index.scss'
);
var
stats
=
{};
var
stats
=
{};
var
expected
=
[
fixture
(
'include-files/bar.scss'
).
replace
(
/
\\
/g
,
'/'
),
fixture
(
'include-files/foo.scss'
).
replace
(
/
\\
/g
,
'/'
),
'stdin'
];
sass
.
render
({
sass
.
render
({
data
:
read
(
fixture
(
'include-files/index.scss'
)
,
'utf8'
),
data
:
read
(
src
,
'utf8'
),
includePaths
:
[
fixture
(
'include-files'
)],
includePaths
:
[
fixture
(
'include-files'
)],
stats
:
stats
,
stats
:
stats
,
success
:
function
()
{
success
:
function
()
{
[
'foo'
,
'bar'
].
map
(
function
(
expect
)
{
assert
.
deepEqual
(
stats
.
includedFiles
,
expected
);
var
slug
=
fixture
(
'include-files/'
+
expect
+
'.scss'
).
replace
(
/
\\
/g
,
'/'
);
assert
(
stats
.
includedFiles
.
some
(
function
(
s
)
{
return
s
===
slug
;
}));
});
done
();
},
error
:
function
(
err
)
{
assert
(
!
err
);
done
();
done
();
}
}
});
});
});
});
});
});
describe
(
'.renderSync(options)'
,
function
()
{
describe
(
'.renderSync(options)'
,
function
()
{
...
@@ -379,9 +376,7 @@ describe('api', function() {
...
@@ -379,9 +376,7 @@ describe('api', function() {
fixture
(
'include-files/index.scss'
).
replace
(
/
\\
/g
,
'/'
)
fixture
(
'include-files/index.scss'
).
replace
(
/
\\
/g
,
'/'
)
];
];
assert
.
equal
(
stats
.
includedFiles
[
0
],
expected
[
0
]);
assert
.
deepEqual
(
stats
.
includedFiles
,
expected
);
assert
.
equal
(
stats
.
includedFiles
[
1
],
expected
[
1
]);
assert
.
equal
(
stats
.
includedFiles
[
2
],
expected
[
2
]);
done
();
done
();
});
});
...
@@ -435,10 +430,6 @@ describe('api', function() {
...
@@ -435,10 +430,6 @@ describe('api', function() {
});
});
});
});
describe
(
'.renderSync({stats: {}})'
,
function
()
{
describe
(
'.renderSync({stats: {}})'
,
function
()
{
var
start
=
Date
.
now
();
var
start
=
Date
.
now
();
var
stats
=
{};
var
stats
=
{};
...
...
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