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
705fa104
Commit
705fa104
authored
Aug 19, 2015
by
Michael Mifsud
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1058 from saper/extracolortest
Additional tests for SassTypes::Color
parents
8d499724
df1c827c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
0 deletions
+44
-0
api.js
test/api.js
+44
-0
No files found.
test/api.js
View file @
705fa104
...
@@ -769,6 +769,50 @@ describe('api', function() {
...
@@ -769,6 +769,50 @@ describe('api', function() {
});
});
});
});
describe
(
'should properly bubble up errors from sass color constructor'
,
function
()
{
it
(
'four booleans'
,
function
(
done
)
{
sass
.
render
({
data
:
'div { color: foo(); }'
,
functions
:
{
'foo()'
:
function
()
{
return
new
sass
.
types
.
Color
(
false
,
false
,
false
,
false
);
}
}
},
function
(
error
)
{
assert
.
ok
(
/Constructor arguments should be numbers exclusively/
.
test
(
error
.
message
));
done
();
});
});
it
(
'two arguments'
,
function
(
done
)
{
sass
.
render
({
data
:
'div { color: foo(); }'
,
functions
:
{
'foo()'
:
function
()
{
return
sass
.
types
.
Color
(
2
,
3
);
}
}
},
function
(
error
)
{
assert
.
ok
(
/Constructor should be invoked with either 0, 1, 3 or 4 arguments/
.
test
(
error
.
message
));
done
();
});
});
it
(
'single string argument'
,
function
(
done
)
{
sass
.
render
({
data
:
'div { color: foo(); }'
,
functions
:
{
'foo()'
:
function
()
{
return
sass
.
types
.
Color
(
'foo'
);
}
}
},
function
(
error
)
{
assert
.
ok
(
/Only argument should be an integer/
.
test
(
error
.
message
));
done
();
});
});
});
it
(
'should properly bubble up errors from sass value constructors'
,
function
(
done
)
{
it
(
'should properly bubble up errors from sass value constructors'
,
function
(
done
)
{
sass
.
render
({
sass
.
render
({
data
:
'div { color: foo(); }'
,
data
:
'div { color: foo(); }'
,
...
...
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