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
1090bdf7
Commit
1090bdf7
authored
Nov 06, 2014
by
Kevin Mårtensson
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #519 from kevva/test-watch
Add test for watching files
parents
84c8b7a9
d14bd4f9
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
1 deletions
+20
-1
cli.js
test/cli.js
+20
-1
No files found.
test/cli.js
View file @
1090bdf7
...
...
@@ -128,7 +128,7 @@ describe('cli', function() {
it
(
'should not exit with the --watch option'
,
function
(
done
)
{
var
src
=
fixture
(
'simple/index.scss'
);
var
bin
=
spawn
(
cli
,
[
'--stdout'
,
'--watch'
,
src
]);
var
bin
=
spawn
(
cli
,
[
src
,
'--stdout'
,
'--watch'
]);
var
exited
;
bin
.
on
(
'close'
,
function
()
{
...
...
@@ -144,6 +144,25 @@ describe('cli', function() {
}
},
100
);
});
it
(
'should emit `warn` on file change when using --watch option'
,
function
(
done
)
{
fs
.
writeFileSync
(
fixture
(
'simple/tmp.scss'
),
''
);
var
src
=
fixture
(
'simple/tmp.scss'
);
var
bin
=
spawn
(
cli
,
[
src
,
'--stdout'
,
'--watch'
]);
bin
.
stderr
.
setEncoding
(
'utf8'
);
bin
.
stderr
.
on
(
'data'
,
function
(
data
)
{
assert
(
data
.
trim
()
===
'=> changed: '
+
src
);
bin
.
kill
();
fs
.
unlinkSync
(
src
);
done
();
});
setTimeout
(
function
()
{
fs
.
appendFileSync
(
src
,
'body {}'
);
},
500
);
});
});
describe
(
'node-sass in.scss --output out.css'
,
function
()
{
...
...
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