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
00454583
Commit
00454583
authored
Feb 25, 2015
by
Adeel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test: Adds a test for missing libsass bin.
parent
5cf107b5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
+21
-0
api.js
test/api.js
+21
-0
No files found.
test/api.js
View file @
00454583
...
@@ -114,6 +114,27 @@ describe('api', function() {
...
@@ -114,6 +114,27 @@ describe('api', function() {
});
});
});
});
it
(
'should throw error when libsass binary is missing.'
,
function
(
done
)
{
var
originalBin
=
path
.
join
(
'vendor'
,
process
.
sassBinaryName
,
'binding.node'
),
renamedBin
=
[
originalBin
,
'_moved'
].
join
(
''
);
assert
.
throws
(
function
()
{
// un-require node-sass
var
resolved
=
require
.
resolve
(
'../lib'
);
delete
require
.
cache
[
resolved
];
fs
.
renameSync
(
originalBin
,
renamedBin
);
// try to re-require it
require
(
'../lib'
);
},
function
(
err
)
{
if
((
err
instanceof
Error
)
&&
/`libsass` bindings not found. Try reinstalling `node-sass`
?
/
.
test
(
err
))
{
fs
.
renameSync
(
renamedBin
,
originalBin
);
done
();
return
true
;
}
});
});
it
(
'should render with --precision option'
,
function
(
done
)
{
it
(
'should render with --precision option'
,
function
(
done
)
{
var
src
=
read
(
fixture
(
'precision/index.scss'
),
'utf8'
);
var
src
=
read
(
fixture
(
'precision/index.scss'
),
'utf8'
);
var
expected
=
read
(
fixture
(
'precision/expected.css'
),
'utf8'
).
trim
();
var
expected
=
read
(
fixture
(
'precision/expected.css'
),
'utf8'
).
trim
();
...
...
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